.showSecurityGroup(aclId).execute(); if (group != null) { com.woorea.openstack.nova.model.SecurityGroup.Rule createdRule = nova
/** * @see com.att.cdp.zones.ComputeService#addACLRule(java.lang.String, com.att.cdp.zones.model.Rule) */ @SuppressWarnings("nls") @Override public Rule addACLRule(String aclId, Rule rule) throws ZoneException { checkArg(aclId, "aclId"); checkArg(rule, "rule"); connect(); Context context = getContext(); trackRequest(); RequestState.put(RequestState.SERVICE, "Compute"); RequestState.put(RequestState.SERVICE_URL, nova.getEndpoint()); try { SecurityGroup group = nova.getClient().securityGroups().showSecurityGroup(aclId).execute(); if (group != null) { com.woorea.openstack.nova.model.SecurityGroup.Rule createdRule = nova.getClient() .securityGroups() .createSecurityGroupRule(aclId, rule.getProtocol().toString(), rule.getFromPort(), rule.getToPort(), rule.getSourceIpRange()).execute(); return new OpenStackRule(context, createdRule); } } catch (OpenStackBaseException ex) { ExceptionMapper.mapException(ex); } return null; }
/** * @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; }
/** * @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; }