Search in sources :

Example 6 with OpaqueMachine

use of org.platformlayer.ops.OpaqueMachine in project platformlayer by platformlayer.

the class ImageStoreController method addDirectStore.

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));
}
Also used : SshKey(org.platformlayer.ops.helpers.SshKey) OpsTarget(org.platformlayer.ops.OpsTarget) PublicKey(java.security.PublicKey) OpaqueMachine(org.platformlayer.ops.OpaqueMachine)

Aggregations

OpaqueMachine (org.platformlayer.ops.OpaqueMachine)6 OpsTarget (org.platformlayer.ops.OpsTarget)6 Machine (org.platformlayer.ops.Machine)4 SshKey (org.platformlayer.ops.helpers.SshKey)3 PublicKey (java.security.PublicKey)2 ServiceType (org.platformlayer.ids.ServiceType)2 NetworkPoint (org.platformlayer.ops.networks.NetworkPoint)2 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 CasStoreInfo (org.platformlayer.cas.CasStoreInfo)1 BindingScope (org.platformlayer.ops.BindingScope)1 Handler (org.platformlayer.ops.Handler)1 OpsContext (org.platformlayer.ops.OpsContext)1 OpsException (org.platformlayer.ops.OpsException)1 OpsCasTarget (org.platformlayer.ops.cas.OpsCasTarget)1 FilesystemCasStore (org.platformlayer.ops.cas.filesystem.FilesystemCasStore)1 DirectImageStore (org.platformlayer.ops.images.direct.DirectImageStore)1