use of com.att.cdp.openstack.model.OpenStackACL in project AJSC by att.
the class OpenStackComputeService method getAccessControlList.
/**
* @see com.att.cdp.zones.ComputeService#getAccessControlList(java.lang.String)
*/
@SuppressWarnings("nls")
@Override
public ACL getAccessControlList(String id) throws ZoneException {
checkArg(id, "id");
connect();
Context context = getContext();
trackRequest();
RequestState.put(RequestState.SERVICE, "Compute");
RequestState.put(RequestState.SERVICE_URL, nova.getEndpoint());
try {
SecurityGroup group = nova.getClient().securityGroups().showSecurityGroup(id).execute();
return new OpenStackACL(context, group);
} catch (OpenStackBaseException ex) {
ExceptionMapper.mapException(ex);
}
return null;
}
use of com.att.cdp.openstack.model.OpenStackACL in project AJSC by att.
the class OpenStackComputeService method getAccessControlList.
/**
* @see com.att.cdp.zones.ComputeService#getAccessControlList(java.lang.String)
*/
@SuppressWarnings("nls")
@Override
public ACL getAccessControlList(String id) throws ZoneException {
checkArg(id, "id");
connect();
Context context = getContext();
trackRequest();
RequestState.put(RequestState.SERVICE, "Compute");
RequestState.put(RequestState.SERVICE_URL, nova.getEndpoint());
try {
SecurityGroup group = nova.getClient().securityGroups().showSecurityGroup(id).execute();
return new OpenStackACL(context, group);
} catch (OpenStackBaseException ex) {
ExceptionMapper.mapException(ex);
}
return null;
}
use of com.att.cdp.openstack.model.OpenStackACL in project AJSC by att.
the class OpenStackComputeService method createAccessControlList.
/**
* @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;
}
use of com.att.cdp.openstack.model.OpenStackACL in project AJSC by att.
the class OpenStackComputeService method getAccessControlLists.
/**
* @see com.att.cdp.zones.ComputeService#getAccessControlLists()
*/
@Override
public List<ACL> getAccessControlLists() throws ZoneException {
connect();
Context context = getContext();
trackRequest();
RequestState.put(RequestState.SERVICE, "Compute");
RequestState.put(RequestState.SERVICE_URL, nova.getEndpoint());
ArrayList<ACL> list = new ArrayList<>();
try {
for (SecurityGroup group : nova.getClient().securityGroups().listSecurityGroups().execute()) {
list.add(new OpenStackACL(context, group));
}
} catch (OpenStackBaseException ex) {
ExceptionMapper.mapException(ex);
}
return list;
}
use of com.att.cdp.openstack.model.OpenStackACL in project AJSC by att.
the class OpenStackComputeService method getAccessControlLists.
/**
* @see com.att.cdp.zones.ComputeService#getAccessControlLists()
*/
@Override
public List<ACL> getAccessControlLists() throws ZoneException {
connect();
Context context = getContext();
ArrayList<ACL> list = new ArrayList<>();
trackRequest();
RequestState.put(RequestState.SERVICE, "Compute");
RequestState.put(RequestState.SERVICE_URL, nova.getEndpoint());
try {
for (SecurityGroup group : nova.getClient().securityGroups().listSecurityGroups().execute()) {
list.add(new OpenStackACL(context, group));
}
} catch (OpenStackBaseException ex) {
ExceptionMapper.mapException(ex);
}
return list;
}
Aggregations