Search in sources :

Example 11 with InstanceGroupResponse

use of com.sequenceiq.cloudbreak.api.model.InstanceGroupResponse in project cloudbreak by hortonworks.

the class TagsUtil method getInstancesList.

protected static List<String> getInstancesList(StackResponse stackResponse) {
    List<InstanceGroupResponse> instanceGroups = stackResponse.getInstanceGroups();
    List<String> instanceIdList = new ArrayList<>();
    for (InstanceGroupResponse instanceGroup : instanceGroups) {
        Set<InstanceMetaDataJson> instanceMetaData = instanceGroup.getMetadata();
        for (InstanceMetaDataJson metaData : instanceMetaData) {
            instanceIdList.add(metaData.getInstanceId());
        }
    }
    return instanceIdList;
}
Also used : ArrayList(java.util.ArrayList) InstanceGroupResponse(com.sequenceiq.cloudbreak.api.model.InstanceGroupResponse) InstanceMetaDataJson(com.sequenceiq.cloudbreak.api.model.InstanceMetaDataJson)

Aggregations

InstanceGroupResponse (com.sequenceiq.cloudbreak.api.model.InstanceGroupResponse)11 StackV1Endpoint (com.sequenceiq.cloudbreak.api.endpoint.v1.StackV1Endpoint)5 ArrayList (java.util.ArrayList)4 StackEndpoint (com.sequenceiq.cloudbreak.api.endpoint.common.StackEndpoint)3 InstanceMetaDataJson (com.sequenceiq.cloudbreak.api.model.InstanceMetaDataJson)3 StackResponse (com.sequenceiq.cloudbreak.api.model.StackResponse)3 IntegrationTestContext (com.sequenceiq.it.IntegrationTestContext)3 Parameters (org.testng.annotations.Parameters)3 Test (org.testng.annotations.Test)3 Map (java.util.Map)2 AmazonEC2 (com.amazonaws.services.ec2.AmazonEC2)1 DescribeSpotInstanceRequestsResult (com.amazonaws.services.ec2.model.DescribeSpotInstanceRequestsResult)1 SpotInstanceRequest (com.amazonaws.services.ec2.model.SpotInstanceRequest)1 EventEndpoint (com.sequenceiq.cloudbreak.api.endpoint.v1.EventEndpoint)1 ClusterResponse (com.sequenceiq.cloudbreak.api.model.ClusterResponse)1 CredentialResponse (com.sequenceiq.cloudbreak.api.model.CredentialResponse)1 FailurePolicyResponse (com.sequenceiq.cloudbreak.api.model.FailurePolicyResponse)1 ImageJson (com.sequenceiq.cloudbreak.api.model.ImageJson)1 NetworkResponse (com.sequenceiq.cloudbreak.api.model.NetworkResponse)1 OrchestratorResponse (com.sequenceiq.cloudbreak.api.model.OrchestratorResponse)1