Skip to content

Commit

Permalink
update (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
fioncat authored Apr 28, 2022
1 parent 6d783cf commit 6c5ba6a
Show file tree
Hide file tree
Showing 61 changed files with 11,593 additions and 2,602 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ gen:
--only "UFile" \
--only "USMS" \
--only "UEC" \
--only "UVMS" \
--public \
-s https://git.ucloudadmin.com/apispec/apispec.git \
/Users/user/code/oas/plugins/template-opensdk-js .
-s $(HOME)/.oas/vcs/git.ucloudadmin.com/apispec/apispec/specification \
$(HOME)/.oas/vcs/git.ucloudadmin.com/apispec/template-opensdk-js .

2 changes: 1 addition & 1 deletion lib/core/middlewares.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ exports.logMiddleware = {
},
error: function (ctx) {
var _a;
console.log("debug", !ctx.config.logger);
console.log('debug', !ctx.config.logger);
if (!ctx.config.logger) {
return;
}
Expand Down
142 changes: 141 additions & 1 deletion lib/services/cube/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ export default class CubeClient extends Client {
* See also: https://docs.ucloud.cn/api/cube-api/get_cube_deployment
*/
getCubeDeployment(request?: GetCubeDeploymentRequest): Promise<GetCubeDeploymentResponse>;
/**
* GetCubeExecToken - 获取登录容器的token
*
* See also: https://docs.ucloud.cn/api/cube-api/get_cube_exec_token
*/
getCubeExecToken(request?: GetCubeExecTokenRequest): Promise<GetCubeExecTokenResponse>;
/**
* GetCubeExtendInfo - 获取Cube的额外信息
*
Expand All @@ -63,6 +69,18 @@ export default class CubeClient extends Client {
* See also: https://docs.ucloud.cn/api/cube-api/get_cube_price
*/
getCubePrice(request?: GetCubePriceRequest): Promise<GetCubePriceResponse>;
/**
* GetCubeToken - 获取Cube的token,可用于terminal登录、log获取
*
* See also: https://docs.ucloud.cn/api/cube-api/get_cube_token
*/
getCubeToken(request?: GetCubeTokenRequest): Promise<GetCubeTokenResponse>;
/**
* ListCubeDeployment - 获取Cube的Deployment列表
*
* See also: https://docs.ucloud.cn/api/cube-api/list_cube_deployment
*/
listCubeDeployment(request?: ListCubeDeploymentRequest): Promise<ListCubeDeploymentResponse>;
/**
* ListCubePod - 获取Pods列表
*
Expand All @@ -81,6 +99,12 @@ export default class CubeClient extends Client {
* See also: https://docs.ucloud.cn/api/cube-api/modify_cube_tag
*/
modifyCubeTag(request?: ModifyCubeTagRequest): Promise<ModifyCubeTagResponse>;
/**
* RebootCubePod - 重启Cube Pod
*
* See also: https://docs.ucloud.cn/api/cube-api/reboot_cube_pod
*/
rebootCubePod(request?: RebootCubePodRequest): Promise<RebootCubePodResponse>;
/**
* RenewCubePod - 更新Pod
*
Expand Down Expand Up @@ -284,6 +308,40 @@ export interface GetCubeDeploymentResponse {
*/
Deployment: string;
}
/**
* GetCubeExecToken - 获取登录容器的token
*/
export interface GetCubeExecTokenRequest {
/**
* 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
*/
Zone?: string;
/**
* 容器名称
*/
ContainerName: string;
/**
* CubeId 和 Uid 中必须填写任意一个。CubeId 是所有 Cube 资源的唯一 ID,如非在 UK8S 通过 Virtual Kubelet 插件创建的 Cube, 则必填 CubeId
*/
CubeId?: string;
/**
* CubeId 和 Uid 中必须填写任意一个。Uid 是在 UK8S 中通过 Virtual Kubelet 插件创建出的 Cube 的唯一标识
*/
Uid?: string;
}
/**
* GetCubeExecToken - 获取登录容器的token
*/
export interface GetCubeExecTokenResponse {
/**
* 有效时间5min
*/
Token: string;
/**
* terminal的登录连接地址,限单点登录,有效时间5min
*/
TerminalUrl?: string;
}
/**
* GetCubeExtendInfo - 获取Cube的额外信息
*/
Expand Down Expand Up @@ -497,12 +555,72 @@ export interface GetCubePriceResponse {
*/
OriginalPrice: number;
}
/**
* GetCubeToken - 获取Cube的token,可用于terminal登录、log获取
*/
export interface GetCubeTokenRequest {
/**
* 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
*/
Zone?: string;
/**
* 容器名称
*/
ContainerName: string;
/**
* CubeId 和 Uid 中必须填写任意一个。CubeId 是所有 Cube 资源的唯一 ID,如非在 UK8S 通过 Virtual Kubelet 插件创建的 Cube, 则必填 CubeId
*/
CubeId?: string;
/**
* CubeId 和 Uid 中必须填写任意一个。Uid 是在 UK8S 中通过 Virtual Kubelet 插件创建出的 Cube 的唯一标识
*/
Uid?: string;
}
/**
* GetCubeToken - 获取Cube的token,可用于terminal登录、log获取
*/
export interface GetCubeTokenResponse {
/**
* 有效时间5min
*/
Token: string;
}
/**
* ListCubeDeployment - 获取Cube的Deployment列表
*/
export interface ListCubeDeploymentRequest {
/**
* 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
*/
Zone?: string;
/**
* 默认0
*/
Offset: number;
/**
* 默认20
*/
Limit: number;
}
/**
* ListCubeDeployment - 获取Cube的Deployment列表
*/
export interface ListCubeDeploymentResponse {
/**
*
*/
TotalCount: number;
/**
* DeploymentInfo
*/
Deployments: string[];
}
/**
* ListCubePod - 获取Pods列表
*/
export interface ListCubePodRequest {
/**
* 可用区。参见 [可用区列表](../summary/regionlist.html)
* 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
*/
Zone?: string;
/**
Expand All @@ -525,6 +643,10 @@ export interface ListCubePodRequest {
* 默认20
*/
Limit?: number;
/**
* Deployment的Id
*/
DeploymentId?: string;
}
/**
* ListCubePod - 获取Pods列表
Expand Down Expand Up @@ -587,6 +709,24 @@ export interface ModifyCubeTagResponse {
*/
CubeId: string;
}
/**
* RebootCubePod - 重启Cube Pod
*/
export interface RebootCubePodRequest {
/**
* 可用区。参见 [可用区列表](https://docs.ucloud.cn/api/summary/regionlist)
*/
Zone?: string;
/**
* cube资源id(cube-xxxxxx)
*/
CubeId: string;
}
/**
* RebootCubePod - 重启Cube Pod
*/
export interface RebootCubePodResponse {
}
/**
* RenewCubePod - 更新Pod
*/
Expand Down
36 changes: 36 additions & 0 deletions lib/services/cube/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ class CubeClient extends client_1.default {
const args = Object.assign({ Action: 'GetCubeDeployment' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetCubeExecToken - 获取登录容器的token
*
* See also: https://docs.ucloud.cn/api/cube-api/get_cube_exec_token
*/
getCubeExecToken(request) {
const args = Object.assign({ Action: 'GetCubeExecToken' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetCubeExtendInfo - 获取Cube的额外信息
*
Expand Down Expand Up @@ -93,6 +102,24 @@ class CubeClient extends client_1.default {
const args = Object.assign({ Action: 'GetCubePrice' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* GetCubeToken - 获取Cube的token,可用于terminal登录、log获取
*
* See also: https://docs.ucloud.cn/api/cube-api/get_cube_token
*/
getCubeToken(request) {
const args = Object.assign({ Action: 'GetCubeToken' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* ListCubeDeployment - 获取Cube的Deployment列表
*
* See also: https://docs.ucloud.cn/api/cube-api/list_cube_deployment
*/
listCubeDeployment(request) {
const args = Object.assign({ Action: 'ListCubeDeployment' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* ListCubePod - 获取Pods列表
*
Expand Down Expand Up @@ -120,6 +147,15 @@ class CubeClient extends client_1.default {
const args = Object.assign({ Action: 'ModifyCubeTag' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* RebootCubePod - 重启Cube Pod
*
* See also: https://docs.ucloud.cn/api/cube-api/reboot_cube_pod
*/
rebootCubePod(request) {
const args = Object.assign({ Action: 'RebootCubePod' }, (request || {}));
return this.invoke(new request_1.default(args)).then((resp) => resp.toObject());
}
/**
* RenewCubePod - 更新Pod
*
Expand Down
1 change: 1 addition & 0 deletions lib/services/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export declare class Client extends BaseClient {
unet(): any;
uphost(): any;
usms(): any;
uvms(): any;
vpc(): any;
}
export {};
7 changes: 7 additions & 0 deletions lib/services/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const UMemClient = require('./umem').default;
const UNetClient = require('./unet').default;
const UPHostClient = require('./uphost').default;
const USMSClient = require('./usms').default;
const UVMSClient = require('./uvms').default;
const VPCClient = require('./vpc').default;
class Client extends BaseClient {
constructor({ config, credential, }) {
Expand Down Expand Up @@ -111,8 +112,14 @@ class Client extends BaseClient {
usms() {
return new USMSClient({ config: this.config, credential: this.credential });
}
uvms() {
return new UVMSClient({ config: this.config, credential: this.credential });
}
vpc() {
return new VPCClient({ config: this.config, credential: this.credential });
}
}
exports.Client = Client;
module.exports = {
Client: Client,
};
18 changes: 13 additions & 5 deletions lib/services/ipsecvpn/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ export interface CreateVPNTunnelRequest {
* vpcId
*/
VPCId: string;
/**
* ike版本,枚举值: "IKE V1","IKE V2",默认v1
*/
IKEVersion: string;
/**
* 指定VPN连接的本地子网的资源ID,最多可填写10个。
*/
Expand All @@ -204,10 +208,6 @@ export interface CreateVPNTunnelRequest {
* 指定VPN连接的客户网段,最多可填写20个。
*/
IPSecRemoteSubnets: string[];
/**
* ike版本,枚举值: "IKE V1","IKE V2",默认v1
*/
IKEVersion: string;
/**
* 业务组,默认为“Default”
*/
Expand Down Expand Up @@ -253,7 +253,7 @@ export interface CreateVPNTunnelRequest {
*/
IPSecEncryptionAlgorithm?: string;
/**
* IPSec隧道中使用的认证算法,枚举值,"md5", "sha1"。默认值为“sha1”
* IPSec隧道中使用的认证算法,枚举值,"md5", "sha1","sha2-256"。默认值为“sha1”
*/
IPSecAuthenticationAlgorithm?: string;
/**
Expand All @@ -268,6 +268,10 @@ export interface CreateVPNTunnelRequest {
* IPSec的PFS是否开启,枚举值,,不开启,"disable";数字表示DH组, "1", "2", "5", "14", "15", "16"。默认为“disable”。
*/
IPSecPFSDhGroup?: string;
/**
* IPSec隧道关闭后的处理动作,枚举值:“none”,流量触发;“restart”,自动重联,默认为none
*/
IPSecCloseAction?: string;
}
/**
* CreateVPNTunnel - 创建VPN隧道
Expand Down Expand Up @@ -794,6 +798,10 @@ export interface UpdateVPNTunnelAttributeRequest {
* 枚举值:"IKE V1","IKE V2"
*/
IKEVersion?: string;
/**
* IPSec隧道关闭后的处理动作,默认与原本一致,若原本为空,必传。枚举值:“none”,不处理(推荐为none,流量会自动触发隧道重建);“restart”重建
*/
IPSecCloseAction?: string;
}
/**
* UpdateVPNTunnelAttribute - 更新VPN隧道属性
Expand Down
Loading

0 comments on commit 6c5ba6a

Please sign in to comment.