Package org.platformlayer.ops

Examples of org.platformlayer.ops.ServiceConfiguration


  public ProjectContext() {
  }

  public ProjectId getProjectId() {
    ServiceConfiguration serviceConfiguration = OpsContext.get().getServiceConfiguration();
    ProjectId project = serviceConfiguration.getProject();

    PlatformLayerKey targetItemKey = opsContext.getJobRecord().getTargetItemKey();
    if (targetItemKey != null) {
      ProjectId project2 = targetItemKey.getProject();
      if (!project.equals(project2)) {
View Full Code Here


  @Inject
  PrivateDataHelper privateData;

  @Deprecated
  public SshKey findOtherServiceKey(ServiceType serviceType) throws OpsException {
    ServiceConfiguration serviceConfiguration = opsContext.getServiceConfiguration();
    KeyPair sshKeyPair = privateData.findSshKey(serviceConfiguration.getProject(), serviceType);
    return new SshKey(null, "root", sshKeyPair);
  }
View Full Code Here

    KeyPair sshKeyPair = privateData.findSshKey(serviceConfiguration.getProject(), serviceType);
    return new SshKey(null, "root", sshKeyPair);
  }

  public SshKey getOrCreate(String sshKeyName, String user) throws OpsException {
    ServiceConfiguration serviceConfiguration = opsContext.getServiceConfiguration();
    return privateData.getOrCreate(serviceConfiguration.getProject(), serviceConfiguration.getServiceType(),
        sshKeyName, user);
  }
View Full Code Here

      federationMap.addDefault(defaultClient);

      platformLayerClient = FederatedPlatformLayerClient.build(runAsProjectId, federationMap);
    }

    ServiceConfiguration serviceConfiguration = new ServiceConfiguration(runAsProjectId, serviceType);

    ServiceAuthorization serviceAuthorization;
    try {
      serviceAuthorization = serviceAuthorizationService.findServiceAuthorization(serviceType, runAsProjectId);
      // if (serviceAuthorization == null) {
      // throw new OpsServiceNotAuthorizedException();
      // }
      if (serviceAuthorization == null) {
        serviceAuthorization = new ServiceAuthorization();
        serviceAuthorization.serviceType = serviceConfiguration.getServiceType().getKey();
      }
    } catch (RepositoryException e) {
      throw new OpsException("Error reading from repository", e);
    }
View Full Code Here

TOP

Related Classes of org.platformlayer.ops.ServiceConfiguration

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.