Search in sources :

Example 6 with PlatformLayerCliContext

use of org.platformlayer.client.cli.PlatformLayerCliContext in project platformlayer by platformlayer.

the class ScriptCommands method getSshPublicKey.

public static Object getSshPublicKey(String serviceType) throws PlatformLayerClientException, JSONException {
    PlatformLayerCliContext context = PlatformLayerCliContext.get();
    PlatformLayerClient client = context.getPlatformLayerClient();
    String key = client.getSshPublicKey(serviceType);
    return toPython(key);
}
Also used : PlatformLayerClient(org.platformlayer.PlatformLayerClient) PlatformLayerCliContext(org.platformlayer.client.cli.PlatformLayerCliContext)

Aggregations

PlatformLayerCliContext (org.platformlayer.client.cli.PlatformLayerCliContext)6 PlatformLayerClient (org.platformlayer.PlatformLayerClient)4 JSONObject (org.codehaus.jettison.json.JSONObject)3 UntypedItemXml (org.platformlayer.UntypedItemXml)1 Tags (org.platformlayer.core.model.Tags)1 Element (org.w3c.dom.Element)1 Node (org.w3c.dom.Node)1 NodeList (org.w3c.dom.NodeList)1