Package org.openstack.client.common

Examples of org.openstack.client.common.OpenstackComputeClient.root()


    try {
      server = TimeoutPoll.poll(TimeSpan.FIVE_MINUTES, TimeSpan.TEN_SECONDS, new PollFunction<Server>() {
        @Override
        public Server call() throws Exception {
          log.info("Waiting for floating IP attach; polling server: " + serverId);
          Server server = compute.root().servers().server(serverId).show();

          List<Ip> publicIps = helpers.findPublicIps(cloud, server);
          if (publicIps.isEmpty()) {
            return null;
          }
View Full Code Here


    if (cloudBehaviours.supportsSecurityGroups()) {
      Server server = machine.getServer();
      SecurityGroup securityGroup = openstackHelpers.getMachineSecurityGroup(openstackComputeClient, server);

      securityGroup = openstackComputeClient.root().securityGroups().securityGroup(securityGroup.getId()).show();

      SecurityGroupRule matchingRule = findMatchingRule(securityGroup);

      if (OpsContext.isConfigure()) {
        if (matchingRule == null) {
View Full Code Here

          rule.setIpProtocol("tcp");
          rule.setFromPort(model.publicPort);
          rule.setToPort(model.publicPort);
          rule.setParentGroupId(securityGroup.getId());

          openstackComputeClient.root().securityGroupRules().create(rule);
        }
      }

      if (OpsContext.isDelete()) {
        if (matchingRule != null) {
View Full Code Here

        }
      }

      if (OpsContext.isDelete()) {
        if (matchingRule != null) {
          openstackComputeClient.root().securityGroupRules().securityGroupRule(matchingRule.id).delete();
        }
      }
    }
  }
View Full Code Here

    // Is it safe to assume that everyone has the same capabilities on a cloud??
    CachedInfo info = cachedInfo.get(cloud.endpoint);
    if (info == null) {
      OpenstackCloudHelpers helpers = new OpenstackCloudHelpers();
      OpenstackComputeClient compute = helpers.buildOpenstackComputeClient(cloud);
      List<Extension> extensions = Lists.newArrayList(compute.root().extensions().list());
      info = new CachedInfo(extensions);
      cachedInfo.put(cloud.endpoint, info);
    }
    return info;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.