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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations