use of info.xiancloud.core.message.UnitResponse in project xian by happyyangyuan.
the class App method rollBackClusterService.
/**
* 回滚服务
*/
static void rollBackClusterService() {
// description
// Man.serial();
Map<String, Object> params = new HashMap<String, Object>();
params.put("clusterId", "cls-768pakpq");
params.put("serviceName", "my-mongodb");
UnitResponse result = SyncXian.call("qcloudContainerService", "rollBackClusterService", params);
System.out.println(result.getData().toString());
}
use of info.xiancloud.core.message.UnitResponse in project xian by happyyangyuan.
the class App method modifyServiceDescription.
/**
* 修改服务描述
*/
static void modifyServiceDescription() {
// description
// Man.serial();
Map<String, Object> params = new HashMap<String, Object>();
params.put("clusterId", "cls-768pakpq");
params.put("serviceName", "my-mongodb");
params.put("description", "嗯,修改服务描述了");
UnitResponse result = SyncXian.call("qcloudContainerService", "modifyServiceDescription", params);
System.out.println(result.getData().toString());
}
use of info.xiancloud.core.message.UnitResponse in project xian by happyyangyuan.
the class App method describeServiceInstance.
/**
* 查询服务实例列表
*/
static void describeServiceInstance() {
// description
// Man.serial();
Map<String, Object> params = new HashMap<String, Object>();
params.put("clusterId", "cls-768pakpq");
params.put("serviceName", "my-mongodb");
UnitResponse result = SyncXian.call("qcloudContainerService", "describeServiceInstance", params);
System.out.println(result.getData().toString());
}
use of info.xiancloud.core.message.UnitResponse in project xian by happyyangyuan.
the class App method modifyClusterService.
/**
* 修改服务
*/
static void modifyClusterService() {
// Man.serial();
Map<String, Object> params = new HashMap<String, Object>();
params.put("clusterId", "cls-768pakpq");
params.put("serviceName", "my-mongodb");
params.put("serviceDesc", "serverdecModify");
params.put("strategy", "Recreate");
// params.put("namespace", "xian");
params.put("replicas", 1);
// params.put("accessType","LoadBalancer");
// 端口映射相关
JSONArray portMappings = new JSONArray();
JSONObject portMap = new JSONObject();
portMap.put("lbPort", 80);
portMap.put("containerPort", 80);
// accessType=LoadBalancer 时,不需要传
// portMap.put("nodePort", 36001);
portMap.put("protocol", "TCP");
portMappings.add(portMap);
// ---容器相关-----
JSONArray containers = new JSONArray();
JSONObject objContain = new JSONObject();
//
objContain.put("containerName", "mongodb");
objContain.put("image", "mongo");
containers.add(objContain);
params.put("portMappings.n", portMappings.toJSONString());
params.put("containers.n", containers.toJSONString());
UnitResponse result = SyncXian.call("qcloudContainerService", "modifyClusterService", params);
System.out.println(result.getData().toString());
}
use of info.xiancloud.core.message.UnitResponse in project xian by happyyangyuan.
the class App method deleteClusterService.
// ----------服务相关接口
/**
* 删除服务
*/
static void deleteClusterService() {
// description
// Man.serial();
Map<String, Object> params = new HashMap<String, Object>();
params.put("clusterId", "cls-768pakpq");
params.put("serviceName", "my-mongodb");
UnitResponse result = SyncXian.call("qcloudContainerService", "deleteClusterService", params);
System.out.println(result.getData().toString());
}
Aggregations