Skip to content

Commit

Permalink
release 3.0.9-beta source code for nodejs
Browse files Browse the repository at this point in the history
  • Loading branch information
Huaweicloud-SDK committed Jun 30, 2021
1 parent 1ba6f64 commit 1512256
Show file tree
Hide file tree
Showing 181 changed files with 2,031 additions and 3,295 deletions.
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,67 @@
# 3.0.9-beta 2021-06-29

### HuaweiCloud SDK Core
- _feature_
- Support multipart/form-data
- _Bug Fix_
- None
- _Change_
- None

### HuaweiCloud SDK ECS

- _Features_
- None
- _Bug Fix_
- Solve the issue of abnormal parsing result when using interface `NovaShowKeypair` to obtain the secret key.
- _Change_
- None

### HuaweiCloud SDK CCE

- _Features_
- None
- _Bug Fix_
- [Issue 20](https://github.com/huaweicloud/huaweicloud-sdk-go-v3/issues/20): Fix the issue that the type of `extendParam`
is defined incorrectly.
- [Issue 22](https://github.com/huaweicloud/huaweicloud-sdk-go-v3/issues/22): Modify the optional value of response parameter `status` of interface `ListAddonInstances`.
- _Change_
- Add the request parameter `tobedeleted` to the interface `DeleteCluster`.
- Add a request parameter `storage` to interfaces `CreateNodePool`,`ShowNodePool`,`UpdateNodePool`,`DeleteNodePool`.

### HuaweiCloud SDK IoTDA

- _Features_
- Support more interfaces:
- `UploadBatchTaskFile`
- `ListComplexQueryDevice`
- Remove interfaces:
- `ListSubscriptions`
- `CreateSubscription`
- `UpdateSubscription`
- `ShowSubscription`
- `DeleteSubscription`
- _Bug Fix_
- None
- _Change_
- None

### HuaweiCloud SDK IAM

- _Features_
- None
- _Bug Fix_
- None
- _Change_
- Add the parameter `access_mode` to interface `CreateUsers`.
- Change the parameter `authentication_code` of interface `DeleteBindingDevice` from required to optional.
- Add optional values to request parameter `type` of the interface `ShowDomainQuota`:
- `assigment_group_mp`
- `assigment_agency_mp`
- `assigment_group_ep`
- `assigment_user_ep`
- Add request parameters`permission_type`,`display_name`,`catalog`,`type` of interface `KeystoneListPermissions`.

# 3.0.8-beta 2021-04-15

### HuaweiCloud SDK Core
Expand Down
63 changes: 63 additions & 0 deletions CHANGELOG_CN.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
# 3.0.9-beta 2021-06-29

### HuaweiCloud SDK Core
- _新增特性_
- 支持 multipart/form-data
- _解决问题_
-
- _特性变更_
-

### HuaweiCloud SDK ECS

- _新增特性_
-
- _解决问题_
- 解决了使用接口`NovaShowKeypair`获取秘钥,结果解析异常的问题
- _特性变更_
-

### HuaweiCloud SDK CCE

- _新增特性_
-
- _解决问题_
- [Issue 20](https://github.com/huaweicloud/huaweicloud-sdk-go-v3/issues/20): 修复`extendParam`类型定义错误的问题
- [Issue 22](https://github.com/huaweicloud/huaweicloud-sdk-go-v3/issues/22): 修正接口`ListAddonInstances`的响应参数`status`可选值
- _特性变更_
- 接口`DeleteCluster`新增请求参数`tobedeleted`
- 接口`CreateNodePool``ShowNodePool``UpdateNodePool``DeleteNodePool`新增请求参数`storage`

### HuaweiCloud SDK IoTDA

- _新增特性_
- 新增支持接口:
- `ListComplexQueryDevice`
- `UploadBatchTaskFile`
- 下线订阅管理相关接口:
- `ListSubscriptions`
- `CreateSubscription`
- `UpdateSubscription`
- `ShowSubscription`
- `DeleteSubscription`
- _解决问题_
-
- _特性变更_
-

### HuaweiCloud SDK IAM

- _新增特性_
-
- _解决问题_
-
- _特性变更_
- 接口 `CreateUsers` 新增请求体参数和响应体参数 _access_mode_
- 接口 `DeleteBindingDevice` 将请求体参数 _authentication_code_ 设置为必填参数
- 查询账号配额接口`ShowDomainQuota`的请求参数`type`增加可选值:
- `assigment_group_mp`
- `assigment_agency_mp`
- `assigment_group_ep`
- `assigment_user_ep`
- 接口`KeystoneListPermissions`新增请求参数`permission_type``display_name``catalog``type`

# 3.0.8-beta 2021-04-15

### HuaweiCloud SDK Core
Expand Down
19 changes: 8 additions & 11 deletions core/HcClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ import { IHttpRequest } from "./http/IHttpRequest";
import { HttpRequestBuilder } from "./http/IHttpRequestBuilder";
import { SdkResponse } from "./SdkResponse";
import { ExceptionUtil } from "./exception/ExceptionUtil";
import { AxiosResponse } from "axios";
import { getLogger, Logger, LogLevel } from './logger'
import { getLogger, Logger, LogLevel } from './logger';

export class HcClient {
private httpClient: HttpClient;
Expand Down Expand Up @@ -64,14 +63,12 @@ export class HcClient {

const request = this.buildRequest(options);
// @ts-ignore
return new Promise((resolve: any, reject: any) => {
this.httpClient.sendRequest(request).then(res => {
return resolve(HcClient.extractResponse(res));
}, err => {
let error = err;
let statusCode = error.status;
return reject(ExceptionUtil.generalException(statusCode, error.body));
});
return this.httpClient.sendRequest(request).then(res => {
return this.extractResponse(res);
}, err => {
let error = err;
let statusCode = error.status;
return ExceptionUtil.generalException(statusCode, error.body);
});
}

Expand Down Expand Up @@ -100,7 +97,7 @@ export class HcClient {
return httpRequest;
}

private static extractResponse(result?: any) {
private extractResponse(result?: any) {
const headers = result.headers;
let contentType = headers['content-type'];
contentType = contentType.toLowerCase();
Expand Down
2 changes: 1 addition & 1 deletion core/auth/BasicCredentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class BasicCredentials implements ICredential {
builder.addHeaders("X-Security-Token", this.securityToken);
}

builder.addHeaders("Content-Type", "application/json");
// builder.addHeaders("Content-Type", "application/json");
builder.addAllHeaders(httpRequest.headers);
extend(httpRequest, builder.build());
const headers = AKSKSigner.sign(httpRequest, this);
Expand Down
2 changes: 1 addition & 1 deletion core/auth/GlobalCredentials.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class GlobalCredentials implements ICredential {
builder.addHeaders("X-Security-Token", this.securityToken);
}

builder.addHeaders("Content-Type", "application/json");
// builder.addHeaders("Content-Type", "application/json");
builder.addAllHeaders(httpRequest.headers);
extend(httpRequest, builder.build());
const headers = AKSKSigner.sign(httpRequest, this);
Expand Down
Loading

0 comments on commit 1512256

Please sign in to comment.