public Create createSecurityGroup(String name, String description) { return new Create(new SecurityGroupForCreate(name, description)); }
/** * @see com.att.cdp.zones.ComputeService#createAccessControlList(com.att.cdp.zones.model.ACL) */ @SuppressWarnings("nls") @Override public ACL createAccessControlList(ACL model) throws ZoneException { checkArg(model, "model"); checkArg(model.getName(), "name"); checkArg(model.getDescription(), "description"); connect(); Context context = getContext(); trackRequest(); RequestState.put(RequestState.SERVICE, "Compute"); RequestState.put(RequestState.SERVICE_URL, nova.getEndpoint()); SecurityGroupForCreate create = new SecurityGroupForCreate(); create.setName(model.getName()); create.setDescription(model.getDescription()); try { SecurityGroup group = nova.getClient().securityGroups() .createSecurityGroup(create).execute(); return new OpenStackACL(context, group); } catch (OpenStackBaseException ex) { ExceptionMapper.mapException(ex); } return null; }
/** * @see com.att.cdp.zones.ComputeService#createAccessControlList(com.att.cdp.zones.model.ACL) */ @SuppressWarnings("nls") @Override public ACL createAccessControlList(ACL model) throws ZoneException { checkArg(model, "model"); checkArg(model.getName(), "name"); checkArg(model.getDescription(), "description"); connect(); Context context = getContext(); trackRequest(); RequestState.put(RequestState.SERVICE, "Compute"); RequestState.put(RequestState.SERVICE_URL, nova.getEndpoint()); SecurityGroupForCreate create = new SecurityGroupForCreate(); create.setName(model.getName()); create.setDescription(model.getDescription()); try { SecurityGroup group = nova.getClient().securityGroups().createSecurityGroup(create).execute(); return new OpenStackACL(context, group); } catch (OpenStackBaseException ex) { ExceptionMapper.mapException(ex); } return null; }
/** * Create a new security group using a model object (SecurityGroupForCreate) * * @param model * The model object to be used to create the new group * @return The creator object */ public Create createSecurityGroup(SecurityGroupForCreate model) { return new Create(model); }
public Create createSecurityGroup(String name, String description) { return new Create(new SecurityGroupForCreate(name, description)); }