Package com.sequenceiq.cloudbreak.domain

Examples of com.sequenceiq.cloudbreak.domain.StackDescription


    @Override
    public StackDescription getStackDescription(Stack stack) {
        MDCBuilder.buildMdcContext(stack);
        CloudPlatform cp = stack.getTemplate().cloudPlatform();
        LOGGER.debug("Getting stack description for cloud platform: {} ...", cp);
        StackDescription description = describeContext.describeStackWithResources(stack);
        LOGGER.debug("Found stack description {}", description.getClass());
        return description;
    }
View Full Code Here


    @RequestMapping(value = "stacks/{id}", method = RequestMethod.GET)
    @ResponseBody
    public ResponseEntity<StackJson> getStack(@PathVariable Long id) {
        Stack stack = stackService.get(id);
        StackDescription stackDescription = stackService.getStackDescription(stack);
        StackJson stackJson = stackConverter.convert(stack, stackDescription);
        return new ResponseEntity<>(stackJson, HttpStatus.OK);
    }
View Full Code Here

        given(amazonCloudFormationClient.describeStacks(any(DescribeStacksRequest.class))).willReturn(stackResult);
        given(amazonCloudFormationClient.describeStackResources(any(DescribeStackResourcesRequest.class))).willReturn(stackResourcesResult);
        given(awsStackUtil.createEC2Client(Regions.DEFAULT_REGION, (AwsCredential) credential)).willReturn(ec2Client);
        given(ec2Client.describeInstances(any(DescribeInstancesRequest.class))).willReturn(instancesResult);
        // WHEN
        StackDescription result = underTest.describeStackWithResources(stack, credential);
        // THEN
        verify(ec2Client, times(1)).describeInstances(any(DescribeInstancesRequest.class));
        assertTrue(result.getClass().isAssignableFrom(DetailedAwsStackDescription.class));
    }
View Full Code Here

        given(awsStackUtil.createCloudFormationClient(Regions.DEFAULT_REGION, (AwsCredential) credential)).willReturn(amazonCloudFormationClient);
        given(amazonCloudFormationClient.describeStacks(any(DescribeStacksRequest.class))).willThrow(e);
        given(awsStackUtil.createEC2Client(Regions.DEFAULT_REGION, (AwsCredential) credential)).willReturn(ec2Client);
        given(ec2Client.describeInstances(any(DescribeInstancesRequest.class))).willReturn(instancesResult);
        // WHEN
        StackDescription result = underTest.describeStackWithResources(stack, credential);
        // THEN
        verify(ec2Client, times(1)).describeInstances(any(DescribeInstancesRequest.class));
        assertTrue(result.getClass().isAssignableFrom(DetailedAwsStackDescription.class));
    }
View Full Code Here

TOP

Related Classes of com.sequenceiq.cloudbreak.domain.StackDescription

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.