Search in sources :

Example 1 with SecurityGroupV2Request

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

the class CloudProviderHelper method master.

InstanceGroupV2Request master() {
    InstanceGroupV2Request r = new InstanceGroupV2Request();
    r.setNodeCount(1);
    r.setGroup("master");
    r.setType(InstanceGroupType.GATEWAY);
    SecurityGroupV2Request s = new SecurityGroupV2Request();
    s.setSecurityRules(rules());
    r.setSecurityGroup(s);
    r.setTemplate(template());
    return r;
}
Also used : InstanceGroupV2Request(com.sequenceiq.cloudbreak.api.model.v2.InstanceGroupV2Request) SecurityGroupV2Request(com.sequenceiq.cloudbreak.api.model.v2.SecurityGroupV2Request)

Example 2 with SecurityGroupV2Request

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

the class CloudProviderHelper method master.

public InstanceGroupV2Request master(String securityGroupId) {
    InstanceGroupV2Request r = new InstanceGroupV2Request();
    r.setNodeCount(1);
    r.setGroup("master");
    r.setType(InstanceGroupType.GATEWAY);
    SecurityGroupV2Request s = new SecurityGroupV2Request();
    s.setSecurityGroupId(securityGroupId);
    r.setSecurityGroup(s);
    r.setTemplate(template());
    return r;
}
Also used : InstanceGroupV2Request(com.sequenceiq.cloudbreak.api.model.v2.InstanceGroupV2Request) SecurityGroupV2Request(com.sequenceiq.cloudbreak.api.model.v2.SecurityGroupV2Request)

Example 3 with SecurityGroupV2Request

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

the class CloudProviderHelper method worker.

InstanceGroupV2Request worker() {
    InstanceGroupV2Request r = new InstanceGroupV2Request();
    r.setNodeCount(1);
    r.setGroup("worker");
    r.setType(InstanceGroupType.CORE);
    SecurityGroupV2Request s = new SecurityGroupV2Request();
    s.setSecurityRules(rules());
    r.setSecurityGroup(s);
    r.setTemplate(template());
    return r;
}
Also used : InstanceGroupV2Request(com.sequenceiq.cloudbreak.api.model.v2.InstanceGroupV2Request) SecurityGroupV2Request(com.sequenceiq.cloudbreak.api.model.v2.SecurityGroupV2Request)

Example 4 with SecurityGroupV2Request

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

the class CloudProviderHelper method compute.

InstanceGroupV2Request compute(String securityGroupId) {
    InstanceGroupV2Request r = new InstanceGroupV2Request();
    r.setNodeCount(1);
    r.setGroup("compute");
    r.setType(InstanceGroupType.CORE);
    SecurityGroupV2Request s = new SecurityGroupV2Request();
    s.setSecurityGroupId(securityGroupId);
    r.setSecurityGroup(s);
    r.setTemplate(template());
    return r;
}
Also used : InstanceGroupV2Request(com.sequenceiq.cloudbreak.api.model.v2.InstanceGroupV2Request) SecurityGroupV2Request(com.sequenceiq.cloudbreak.api.model.v2.SecurityGroupV2Request)

Example 5 with SecurityGroupV2Request

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

the class InstanceGroupV2RequestToHostGroupRequestConverterTest method createSource.

@Override
public InstanceGroupV2Request createSource() {
    InstanceGroupV2Request instanceGroupV2Request = new InstanceGroupV2Request();
    instanceGroupV2Request.setGroup("master");
    instanceGroupV2Request.setNodeCount(4);
    instanceGroupV2Request.setParameters(new HashMap<>());
    instanceGroupV2Request.setRecipeNames(Sets.newHashSet(Arrays.asList("recipe1", "recipe2")));
    instanceGroupV2Request.setRecoveryMode(RecoveryMode.MANUAL);
    instanceGroupV2Request.setType(InstanceGroupType.CORE);
    TemplateV2Request templateV2Request = new TemplateV2Request();
    templateV2Request.setInstanceType("m4.xlarge");
    templateV2Request.setParameters(new HashMap<>());
    templateV2Request.setVolumeCount(1);
    templateV2Request.setVolumeSize(100);
    templateV2Request.setVolumeType("ebs");
    instanceGroupV2Request.setTemplate(templateV2Request);
    SecurityGroupV2Request securityGroupV2Request = new SecurityGroupV2Request();
    securityGroupV2Request.setSecurityGroupId("groupid");
    securityGroupV2Request.setSecurityRules(new ArrayList<>());
    instanceGroupV2Request.setSecurityGroup(securityGroupV2Request);
    return instanceGroupV2Request;
}
Also used : InstanceGroupV2Request(com.sequenceiq.cloudbreak.api.model.v2.InstanceGroupV2Request) SecurityGroupV2Request(com.sequenceiq.cloudbreak.api.model.v2.SecurityGroupV2Request) TemplateV2Request(com.sequenceiq.cloudbreak.api.model.v2.TemplateV2Request)

Aggregations

SecurityGroupV2Request (com.sequenceiq.cloudbreak.api.model.v2.SecurityGroupV2Request)9 InstanceGroupV2Request (com.sequenceiq.cloudbreak.api.model.v2.InstanceGroupV2Request)8 SecurityRuleRequest (com.sequenceiq.cloudbreak.api.model.SecurityRuleRequest)2 TemplateV2Request (com.sequenceiq.cloudbreak.api.model.v2.TemplateV2Request)1 SecurityRule (com.sequenceiq.cloudbreak.domain.SecurityRule)1 IntegrationTestContext (com.sequenceiq.it.IntegrationTestContext)1 BeforeMethod (org.testng.annotations.BeforeMethod)1 Parameters (org.testng.annotations.Parameters)1