Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test udl diff #3

Open
wants to merge 2 commits into
base: feature/udl
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ gen:
--only "UEC" \
--public \
-s https://git.ucloudadmin.com/apispec/apispec.git \
/Users/user/code/oas/plugins/template-opensdk-js .
/Users/wenqian/.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
30 changes: 0 additions & 30 deletions lib/services/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1 @@
import { ConfigOptions } from '../core/config';
import { CredentialOptions } from '../core/credential';
declare const BaseClient: any;
export declare class Client extends BaseClient {
constructor({ config, credential, }: {
config: ConfigOptions;
credential: CredentialOptions;
});
cube(): any;
ipsecvpn(): any;
pathx(): any;
uaccount(): any;
ubill(): any;
ucdn(): any;
udb(): any;
uddb(): any;
udisk(): any;
udpn(): any;
uec(): any;
ufile(): any;
ufs(): any;
uhost(): any;
uk8s(): any;
ulb(): any;
umem(): any;
unet(): any;
uphost(): any;
usms(): any;
vpc(): any;
}
export {};
5 changes: 3 additions & 2 deletions lib/services/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Client = void 0;
const BaseClient = require('../core/client').default;
const CubeClient = require('./cube').default;
const IPSecVPNClient = require('./ipsecvpn').default;
Expand Down Expand Up @@ -115,4 +114,6 @@ class Client extends BaseClient {
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