use of com.sequenceiq.cloudbreak.domain.SecurityGroup in project cloudbreak by hortonworks.
the class TestUtil method securityGroup.
public static SecurityGroup securityGroup(long id) {
SecurityGroup sg = new SecurityGroup();
sg.setId(id);
sg.setName("security-group");
sg.setPublicInAccount(true);
sg.setSecurityRules(new HashSet<>());
sg.setStatus(ResourceStatus.DEFAULT);
return sg;
}
use of com.sequenceiq.cloudbreak.domain.SecurityGroup in project cloudbreak by hortonworks.
the class SecurityGroupController method getPublic.
@Override
public SecurityGroupResponse getPublic(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
SecurityGroup securityGroup = securityGroupService.getPublicSecurityGroup(name, user);
return convert(securityGroup);
}
use of com.sequenceiq.cloudbreak.domain.SecurityGroup in project cloudbreak by hortonworks.
the class SecurityGroupController method getPublics.
@Override
public Set<SecurityGroupResponse> getPublics() {
IdentityUser user = authenticatedUserService.getCbUser();
Set<SecurityGroup> securityGroups = securityGroupService.retrieveAccountSecurityGroups(user);
return convert(securityGroups);
}
use of com.sequenceiq.cloudbreak.domain.SecurityGroup in project cloudbreak by hortonworks.
the class SecurityGroupController method getPrivates.
@Override
public Set<SecurityGroupResponse> getPrivates() {
IdentityUser user = authenticatedUserService.getCbUser();
Set<SecurityGroup> securityGroups = securityGroupService.retrievePrivateSecurityGroups(user);
return convert(securityGroups);
}
use of com.sequenceiq.cloudbreak.domain.SecurityGroup in project cloudbreak by hortonworks.
the class SecurityGroupController method getPrivate.
@Override
public SecurityGroupResponse getPrivate(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
SecurityGroup securityGroup = securityGroupService.getPrivateSecurityGroup(name, user);
return convert(securityGroup);
}
Aggregations