Package org.openstack.model.compute

Examples of org.openstack.model.compute.SecurityGroupList


    // securityGroups = openstackComputeClient.root().servers().server(server.getId()).listSecurityGroups();
    // } catch (OpenstackException e) {
    // throw new OpsException("Error getting security groups for server", e);
    // }

    SecurityGroupList securityGroups;
    try {
      log.info("Listing security groups");

      securityGroups = openstackComputeClient.root().securityGroups().list();
    } catch (OpenstackException e) {
      throw new OpsException("Error getting security groups for server", e);
    }

    SecurityGroup securityGroup = null;
    if (securityGroups != null && securityGroups.getList() != null) {
      for (SecurityGroup candidate : securityGroups.getList()) {
        if (candidate.getName() == null) {
          continue;
        }

        if (candidate.getName().equals(OpenstackCloudContext.SECURITY_GROUP_PREFIX + server.getName())) {
View Full Code Here

TOP

Related Classes of org.openstack.model.compute.SecurityGroupList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.