congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
SecurityGroupsExtension
Code IndexAdd Tabnine to your IDE (free)

How to use
SecurityGroupsExtension
in
com.woorea.openstack.nova.api.extensions

Best Java code snippets using com.woorea.openstack.nova.api.extensions.SecurityGroupsExtension (Showing top 16 results out of 315)

origin: woorea/openstack-java-sdk

public Create createSecurityGroup(String name) {
  return createSecurityGroup(name, null);
}
origin: woorea/openstack-java-sdk

public Nova(String endpoint, OpenStackClientConnector connector) {
  super(endpoint, connector);
  EXTENSIONS = new ExtensionsResource(this);
  SERVERS = new ServersResource(this);
  IMAGES = new ImagesResource(this);
  FLAVORS = new FlavorsResource(this);
  KEY_PAIRS = new KeyPairsExtension(this);
  FLOATING_IPS = new FloatingIpsExtension(this);
  SECURITY_GROUPS = new SecurityGroupsExtension(this);
  SNAPSHOTS = new SnapshotsExtension(this);
  VOLUMES = new VolumesExtension(this);
  AGGREGATES = new AggregatesExtension(this);
  QUOTA_SETS = new QuotaSetsResource(this);
  HOSTS = new HostsExtension(this);
  SERVICES = new ServicesResource(this);
  HYPERVISORS = new HypervisorsResource(this);
}

origin: com.att.cdp/cdp-pal-openstack

/**
 * @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;
}
origin: com.att.cdp/cdp-pal-openstack

/**
 * @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;
}
origin: com.att.cdp/cdp-pal-openstack

/**
 * @see com.att.cdp.zones.ComputeService#deleteAccessControlList(java.lang.String)
 */
@SuppressWarnings("nls")
@Override
public void deleteAccessControlList(String id) throws ZoneException {
  checkArg(id, "id");
  connect();
  trackRequest();
  RequestState.put(RequestState.SERVICE, "Compute");
  RequestState.put(RequestState.SERVICE_URL, nova.getEndpoint());
  try {
    nova.getClient().securityGroups().deleteSecurityGroup(id).execute();
  } catch (OpenStackBaseException ex) {
    ExceptionMapper.mapException(ex);
  }
}
origin: com.att.cdp/cdp-pal-openstack

/**
 * @see com.att.cdp.zones.ComputeService#deleteACLRule(java.lang.String)
 */
@SuppressWarnings("nls")
@Override
public void deleteACLRule(Rule rule) throws ZoneException {
  checkArg(rule, "rule");
  connect();
  trackRequest();
  RequestState.put(RequestState.SERVICE, "Compute");
  RequestState.put(RequestState.SERVICE_URL, nova.getEndpoint());
  try {
    nova.getClient().securityGroups().deleteSecurityGroupRule(rule.getId()).execute();
  } catch (OpenStackBaseException ex) {
    ExceptionMapper.mapException(ex);
  }
}
origin: com.att.cdp/cdp-pal-openstack

/**
 * @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;
}
origin: com.att.woorea/nova-client

public Nova(String endpoint, OpenStackClientConnector connector) {
  super(endpoint, connector);
  EXTENSIONS = new ExtensionsResource(this);
  SERVERS = new ServersResource(this);
  IMAGES = new ImagesResource(this);
  FLAVORS = new FlavorsResource(this);
  KEY_PAIRS = new KeyPairsExtension(this);
  FLOATING_IPS = new FloatingIpsExtension(this);
  SECURITY_GROUPS = new SecurityGroupsExtension(this);
  SNAPSHOTS = new SnapshotsExtension(this);
  VOLUMES = new VolumesExtension(this);
  AGGREGATES = new AggregatesExtension(this);
  QUOTA_SETS = new QuotaSetsResource(this);
  HOSTS = new HostsExtension(this);
  SERVICES = new ServicesResource(this);
  HYPERVISORS = new HypervisorsResource(this);
  NETWORKS = new NetworksExtension(this);
}

origin: com.att.cdp/cdp-pal-openstack

    .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(),
origin: com.att.cdp/cdp-pal-openstack

/**
 * @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;
}
origin: com.att.cdp/cdp-pal-openstack

/**
 * @see com.att.cdp.zones.ComputeService#deleteAccessControlList(java.lang.String)
 */
@SuppressWarnings("nls")
@Override
public void deleteAccessControlList(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 {
    nova.getClient().securityGroups().deleteSecurityGroup(id).execute();
  } catch (OpenStackBaseException ex) {
    ExceptionMapper.mapException(ex);
  }
}
origin: com.att.cdp/cdp-pal-openstack

/**
 * @see com.att.cdp.zones.ComputeService#deleteACLRule(java.lang.String)
 */
@SuppressWarnings("nls")
@Override
public void deleteACLRule(Rule rule) throws ZoneException {
  checkArg(rule, "rule");
  connect();
  Context context = getContext();
  trackRequest();
  RequestState.put(RequestState.SERVICE, "Compute");
  RequestState.put(RequestState.SERVICE_URL, nova.getEndpoint());
  try {
    nova.getClient().securityGroups()
        .deleteSecurityGroupRule(rule.getId()).execute();
  } catch (OpenStackBaseException ex) {
    ExceptionMapper.mapException(ex);
  }
}
origin: com.att.cdp/cdp-pal-openstack

/**
 * @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;
}
origin: com.att.woorea/nova-client

public Create createSecurityGroup(String name) {
  return createSecurityGroup(name, null);
}
origin: com.att.cdp/cdp-pal-openstack

/**
 * @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;
}
origin: com.att.cdp/cdp-pal-openstack

/**
 * @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;
}
com.woorea.openstack.nova.api.extensionsSecurityGroupsExtension

Most used methods

  • createSecurityGroup
  • <init>
  • createSecurityGroupRule
  • deleteSecurityGroup
  • deleteSecurityGroupRule
  • listSecurityGroups
  • showSecurityGroup

Popular in Java

  • Making http post requests using okhttp
  • onCreateOptionsMenu (Activity)
  • putExtra (Intent)
  • requestLocationUpdates (LocationManager)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Notification (javax.management)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now