Examples of OpaqueMachine


Examples of org.platformlayer.ops.OpaqueMachine

    // return glanceImageStore;
    // } else

    if (url.getScheme().equals("ssh")) {
      String myAddress = url.getHost();
      Machine machine = new OpaqueMachine(NetworkPoint.forPublicHostname(myAddress));
      // This is nasty; we're in the context of another service here...
      SshKey sshKey = sshKeys.findOtherServiceKey(new ServiceType("imagestore"));
      OpsTarget target = machine.getTarget("imagestore", sshKey.getKeyPair());

      DirectImageStore directImageStore = OpsContext.get().getInjector().getInstance(DirectImageStore.class);
      directImageStore.connect(target);
      return directImageStore;
    } else {
View Full Code Here

Examples of org.platformlayer.ops.OpaqueMachine

  private void addDirectStore(ImageStore model) throws OpsException {
    // Serious bootstrapping problem here!!!
    SshKey serviceKey = service.getSshKey();
    PublicKey sshPublicKey = serviceKey.getKeyPair().getPublic();

    OpaqueMachine machine = new OpaqueMachine(NetworkPoint.forPublicHostname(model.dnsName));
    OpsTarget target = machine.getTarget("imagestore", serviceKey.getKeyPair());

    SshAuthorizedKey.ensureSshAuthorization(target, "imagestore", sshPublicKey);

    // addChild(SshAuthorizedKey.build("root", publicKey));
  }
View Full Code Here

Examples of org.platformlayer.ops.OpaqueMachine

    // targetAddress = NetworkPoint.forPublicHostname(ipv6Range.getGatewayAddress());
    // } else {
    targetAddress = NetworkPoint.forPublicHostname(model.host);
    // }

    Machine machine = new OpaqueMachine(targetAddress);
    OpsTarget machineTarget = machine.getTarget(sshKeys.findOtherServiceKey(new ServiceType("machines-direct")));

    CasStoreInfo casStoreOptions = new CasStoreInfo(true);
    FilesystemCasStore store = new FilesystemCasStore(casStoreOptions, new OpsCasTarget(machineTarget));
    return store;
  }
View Full Code Here

Examples of org.platformlayer.ops.OpaqueMachine

  public void handler() {
  }

  @Override
  public void doRecurseOperation() throws OpsException {
    Machine machine = new OpaqueMachine(address);
    OpsTarget target = machine.getTarget(sshKey);

    BindingScope scope = BindingScope.push(machine, target);
    try {
      OpsContext opsContext = OpsContext.get();
      OperationRecursor.doRecurseChildren(opsContext, this);
View Full Code Here

Examples of org.platformlayer.ops.OpaqueMachine

  @Inject
  PlatformLayerHelpers platformLayer;

  public OpsTarget toTarget(DirectHost host) throws OpsException {
    NetworkPoint address = NetworkPoint.forPublicHostname(host.host);
    Machine hostMachine = new OpaqueMachine(address);
    OpsTarget hostTarget = hostMachine.getTarget(service.getSshKey());
    return hostTarget;
  }
View Full Code Here

Examples of org.platformlayer.ops.OpaqueMachine

  @Inject
  ServiceContext service;

  @Handler
  public void handler(RawTarget rawTarget) throws OpsException, IOException {
    OpaqueMachine machine = new OpaqueMachine(NetworkPoint.forPublicHostname(rawTarget.host));
    SshKey serviceSshKey = service.getSshKey();
    OpsTarget target = machine.getTarget(serviceSshKey);

    // TODO: We have a bootstrapping problem here!!
    PublicKey sshPublicKey = service.getSshKey().getKeyPair().getPublic();
    SshAuthorizedKey.ensureSshAuthorization(target, "root", sshPublicKey);
  }
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.