Examples of PlatformLayerKey


Examples of org.platformlayer.core.model.PlatformLayerKey

    if (action != null) {
      undo = ansi.doAction(action);
    }

    try {
      PlatformLayerKey plk = item.getKey();

      if (fullPath) {
        ansi.print(plk.getUrl());
      } else {
        ansi.print(plk.getItemId().getKey());
      }
    } finally {
      if (undo != null) {
        ansi.doAction(undo);
      }
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

        trustKeys);
    return out;
  }

  private Runnable toRunnable(final ActionTask task) {
    final PlatformLayerKey target = task.target;

    final PlatformLayerEndpointInfo endpoint = rehydrateEndpoint(task.endpoint);

    Runnable runnable = new Runnable() {
      @Override
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

  }

  private String getCollectdHostKey() {
    // TODO: Multiple machines per service
    ItemBase managed = OpsContext.get().getInstance(ItemBase.class);
    PlatformLayerKey modelKey = managed.getKey();
    return CollectdHelpers.toCollectdKey(modelKey);
  }
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

  // private static final int RECENT_JOB_COUNT = 100;

  @Override
  public void jobFinished(JobExecutionData jobExecutionData, JobState state, JobLogger logger) throws OpsException {
    PlatformLayerKey jobKey = jobExecutionData.getJobKey();
    String executionId = jobExecutionData.getExecutionId();

    Date startTime = jobExecutionData.getStartedAt();
    Date endTime = new Date();
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

  public SolrCluster getCluster() throws OpsException {
    if (cluster == null) {
      cluster = OpsContext.get().getInstance(SolrCluster.class);
      if (cluster == null) {
        SolrServer server = getServer();
        PlatformLayerKey parent = Tag.PARENT.findUnique(server);
        if (parent != null) {
          cluster = platformLayer.getItem(parent, SolrCluster.class);
        }
      }
    }
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

    List<String> assignedInstanceIds = instanceTags.findAll(Tag.ASSIGNED);
    if (assignedInstanceIds.isEmpty()) {
      if (createInstance && !OpsContext.isDelete()) {
        MachineCreationRequest request = buildMachineCreationRequest();

        PlatformLayerKey instanceKey = instance.getKey();
        request.tags.add(Tag.buildParentTag(instanceKey));

        String serverName = buildServerName();

        Server created = openstack.createInstance(cloud, serverName, request);
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

      // TODO: Include currently running jobs...
      List<JobEntity> results = db.queries.listRecentJobs(project, maxAge, filterTarget, limit);
      List<JobData> ret = Lists.newArrayList();
      for (JobEntity job : results) {
        ManagedItemId jobId = new ManagedItemId(job.jobId);
        PlatformLayerKey jobKey = JobData.buildKey(projectId, jobId);
        JobData jobData = mapFromEntity(job, jobKey);
        ret.add(jobData);
      }

      sortJobs(ret);
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

    } else {
      links = getModel().links.getLinks();
    }

    {
      PlatformLayerKey metricsKey = metricsManager.findMetricsServer();
      if (metricsKey != null) {
        Link link = new Link();
        link.name = "metrics";
        link.target = metricsKey;
        links.add(link);
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

  public ManagedSecretKey findCaSignedKey(String alias) throws OpsException {
    return findCaSignedKey(getCaPath(), alias);
  }

  public ManagedSecretKey findCaKey() throws OpsException {
    PlatformLayerKey caPath = getCaPath();
    if (caPath == null) {
      return null;
    }

    ItemBase sslKeyItem = (ItemBase) platformLayer.getItem(caPath);
View Full Code Here

Examples of org.platformlayer.core.model.PlatformLayerKey

  }

  protected abstract PlatformLayerKey getSslKeyPath() throws OpsException;

  public ManagedSecretKey findPublicSslKey() throws OpsException {
    PlatformLayerKey sslKey = getSslKeyPath();
    if (sslKey == null) {
      if (getCaPath() != null) {
        ManagedSecretKey key = findCaSignedKey("public");
        if (key != null) {
          return key;
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.