コード例 #1
0
 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;
 }
コード例 #2
0
 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);
 }
コード例 #3
0
 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);
 }
コード例 #4
0
 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);
 }