Examples of PlatformLayerKey


Examples of org.platformlayer.core.model.PlatformLayerKey

  @Override
  public Object runCommand() throws PlatformLayerClientException {
    PlatformLayerClient client = getPlatformLayerClient();

    PlatformLayerKey key = path.resolve(getContext());

    UntypedItem untypedItem = client.getItemUntyped(key, Format.XML);

    InetAddress sshAddress = findSshAddress(client, untypedItem);

    ClientAction action = null;
    if (sshAddress != null) {
      String user = "root";

      ProjectId project = key.getProject();
      if (project == null) {
        project = client.getProject();
      }
      if (project == null) {
        throw new CliException("Cannot determine project");
      }
      String projectKey = project.getKey();
      String serviceKey = "service-" + key.getServiceType().getKey();

      File sshKey = IoUtils.resolve("~/.credentials/ssh/" + projectKey + "/" + serviceKey);

      // Hmmm... user? key?
      action = new ClientAction(ClientAction.ClientActionType.SSH, user + "@" + sshAddress.getHostAddress(),
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

    JobDataList jobs;
    if (path == null) {
      jobs = client.listJobs();
    } else {
      PlatformLayerKey resolved = path.resolve(getContext());
      jobs = client.listJobs(resolved);
    }
    // if (path != null) {
    // PlatformLayerKey resolved = path.resolve(getContext());
    //
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

  }

  protected JobData runAction(ItemPath path, Action action) throws PlatformLayerClientException {
    PlatformLayerClient client = getPlatformLayerClient();

    PlatformLayerKey key = path.resolve(getContext());

    JobData ret = client.doAction(key, action);
    return ret;
  }
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

  @Override
  public Object runCommand() throws PlatformLayerClientException {
    // Should this be a tag?
    PlatformLayerClient client = getPlatformLayerClient();

    PlatformLayerKey key = path.resolve(getContext());

    UntypedItem untypedItem = client.getItemUntyped(key, Format.XML);
    List<EndpointInfo> endpoints = EndpointInfo.getEndpoints(untypedItem.getTags());

    return endpoints;
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

  @Override
  public Object runCommand() throws PlatformLayerClientException {
    PlatformLayerClient client = getPlatformLayerClient();

    PlatformLayerKey key = path.resolve(getContext());
    return client.getItemUntyped(key, getFormat());
  }
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

  @Override
  public Object runCommand() throws PlatformLayerClientException {
    PlatformLayerClient client = getPlatformLayerClient();

    PlatformLayerKey key = path.resolve(getContext());
    boolean includeDeleted = true;
    return client.listChildren(key, includeDeleted);
  }
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

  @Override
  public Object runCommand() throws PlatformLayerClientException {
    PlatformLayerClient client = getPlatformLayerClient();

    PlatformLayerKey resolved = path.resolve(getContext());

    UntypedItemXml item = (UntypedItemXml) client.getItemUntyped(resolved, Format.XML);

    Links links = item.getLinks();
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

      model.state = ManagedItemState.fromCode(stateCode);

      model.secret = secret;

      PlatformLayerKey plk = new PlatformLayerKey(null, project, serviceType, itemType, new ManagedItemId(key));
      model.setKey(plk);

      return model;
    } catch (JAXBException e) {
      throw new RepositoryException("Error deserializing data", e);
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

    // throw new UnsupportedOperationException();
  }

  @Override
  protected PlatformLayerKey toKey(JaxbHelper jaxbHelper) throws PlatformLayerClientException {
    PlatformLayerKey key = super.toKey(jaxbHelper);
    // TODO: Add host
    return key;
  }
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

    ChildClient childClient = getClient(childKey);
    childItemId = null;

    MappedPlatformLayerKey mapped = new MappedPlatformLayerKey();
    mapped.child = childClient;
    mapped.key = new PlatformLayerKey(childKey.host, childKey.project, plk.getServiceType(), plk.getItemType(),
        childItemId);
    return mapped;
  }
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.