public static Object getSchema(String serviceType) throws PlatformLayerClientException, JSONException { PlatformLayerCliContext context = PlatformLayerCliContext.get(); PlatformLayerClient client = context.getPlatformLayerClient(); String retval = client.getSchema(serviceType, Format.XML); return retval; }
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); }
public static Object getActivation(String serviceType) throws PlatformLayerClientException, JSONException { PlatformLayerCliContext context = PlatformLayerCliContext.get(); PlatformLayerClient client = context.getPlatformLayerClient(); String retvalJsonString = client.getActivation(serviceType, Format.JSON); JSONObject retvalJsonObject = new JSONObject(retvalJsonString); return toPython(retvalJsonObject); }
public static Object activateService(String serviceType, Object properties) throws PlatformLayerClientException, JSONException { PlatformLayerCliContext context = PlatformLayerCliContext.get(); PlatformLayerClient client = context.getPlatformLayerClient(); String json = properties.toString(); String wrapper = "{ \"data\": \"" + json + "\" }"; String retvalJsonString = client.activateService(serviceType, wrapper, Format.JSON); JSONObject retvalJsonObject = new JSONObject(retvalJsonString); return toPython(retvalJsonObject); }