Skip to content

Commit

Permalink
release 3.0.25-beta source code for net
Browse files Browse the repository at this point in the history
  • Loading branch information
Huaweicloud-SDK committed Dec 15, 2020
1 parent dd44b76 commit ec7bc27
Show file tree
Hide file tree
Showing 382 changed files with 39,743 additions and 2,017 deletions.
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
## 3.0.25-beta 2020-12-15
## HuaweiCloud SDK CCE
- ### Features
- Support Cloud Container Engine service.
- ### Bug Fix
- None
- ### Change
- None

## HuaweiCloud SDK ELB
- ### Features
- None
- ### Bug Fix
- Fix the problem that sending request to interface `CreateListener` returns empty response.
- Fix the problem that sending request to interface `CreateListener` returns response with wrong type.
- ### Change
- None

## HuaweiCloud SDK NAT
- ### Features
- None
- ### Bug Fix
- Fix the problem that using interface `BatchCreateNatGatewayDnatRules` failed.
- ### Change
- None


## 3.0.24-beta 2020-12-04
## HuaweiCloud SDK SMN
- ### Features
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG_CN.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
## 3.0.25-beta 2020-12-15
## HuaweiCloud SDK CCE
- ### 新增特性
- 支持云容器引擎服务
- ### 解决问题
-
- ### 特性变更
-

## HuaweiCloud SDK ELB
- ### 新增特性
-
- ### 解决问题
- 创建监听器接口返回为空问题修复
- 证书列表查询接口返回非列表问题修复
- ### 特性变更
-

## HuaweiCloud SDK NAT
- ### 新增特性
-
- ### 解决问题
- 修复批量创建DNAT规则失败的问题
- ### 特性变更
-


## 3.0.24-beta 2020-12-04
## HuaweiCloud SDK SMN
- ### 新增特性
Expand Down
9 changes: 3 additions & 6 deletions Core/Http/SdkHttpClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,9 @@ public HttpRequestMessage InitHttpRequest(HttpRequest request)
}
}

if (request.Body != null)
{
message.Content = new StringContent(request.Body);
message.Content.Headers.ContentType =
new MediaTypeHeaderValue(select_header_content_type(request.ContentType));
}
message.Content = new StringContent(request.Body);
message.Content.Headers.ContentType =
new MediaTypeHeaderValue(select_header_content_type(request.ContentType));

if (request.FileStream != null && request.FileStream != Stream.Null)
{
Expand Down
57 changes: 47 additions & 10 deletions Core/Utils/HttpUtils.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Copyright 2020 Huawei Technologies Co.,Ltd.
*
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
Expand Down Expand Up @@ -71,20 +71,18 @@ private static string GetQueryParameters(Object obj)
{
continue;
}

if (value is IList list)
{
var qs = new StringBuilder();
foreach (var item in list)
{
qs.Append(sdkPropertyAttribute.PropertyName).Append("=").Append(Convert.ToString(item)).Append("&");
}

sb.Append(qs);
sb.Append(BuildQueryListParameter(sdkPropertyAttribute.PropertyName, list));
}
else if(value is IDictionary dictionary)
{
sb.Append(BuildQueryDictionaryParameter(sdkPropertyAttribute.PropertyName, dictionary));
}
else
{
sb.Append(sdkPropertyAttribute.PropertyName).Append("=").Append(Convert.ToString(value)).Append("&");
sb.Append(BuildQueryStringParameter(sdkPropertyAttribute.PropertyName, Convert.ToString(value)));
}
}

Expand All @@ -97,6 +95,45 @@ private static string GetQueryParameters(Object obj)
return sb.ToString();
}

private static StringBuilder BuildQueryStringParameter(string key, string value)
{
var sb = new StringBuilder();
return sb.Append(key).Append("=").Append(Convert.ToString(value)).Append("&");
}

private static StringBuilder BuildQueryListParameter(string key, IList list)
{
var sb = new StringBuilder();
foreach (var item in list)
{
sb.Append(key).Append("=").Append(Convert.ToString(item)).Append("&");
}

return sb;
}

private static StringBuilder BuildQueryDictionaryParameter(string key, IDictionary dict)
{
var sb = new StringBuilder();
foreach (var k in dict.Keys)
{
if (dict[k] is IList list)
{
sb.Append(BuildQueryListParameter(key + "[" + k + "]", list));
}
else if (dict[k] is IDictionary dictionary)
{
sb.Append(BuildQueryDictionaryParameter(key + "[" + k + "]", dictionary));
}
else
{
sb.Append(BuildQueryStringParameter(key + "[" + k + "]", Convert.ToString(dict[k])));
}
}

return sb;
}

private static Dictionary<string, string> GetRequestHeader(object obj)
{
var t = obj.GetType();
Expand Down
2 changes: 1 addition & 1 deletion Core/obj/Core.csproj.nuget.cache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"dgSpecHash": "eOmBYFBY5114ONMfTyvAtMrOBKQuv9e15FEeruyuAAJjKGiUZy7A7hA3D1fHHv3gvSfY00Q5VSPWuwpph9q2hQ==",
"dgSpecHash": "90zS6fzc/PfhVNVmXagvEyk/WCkUghh5ut66lTUKM/UDdr+kmESM4wDh6T5CkyIvqwf6kVmKSIBn0g+dkWElOg==",
"success": true
}
12 changes: 6 additions & 6 deletions Core/obj/Core.csproj.nuget.dgspec.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"format": 1,
"restore": {
"/data/fuxi_ci_workspace/5fcde8367ebd0c3984b5d3e9/Core/Core.csproj": {}
"/data/fuxi_ci_workspace/5fd89abc5c740a0a8a7e7090/Core/Core.csproj": {}
},
"projects": {
"/data/fuxi_ci_workspace/5fcde8367ebd0c3984b5d3e9/Core/Core.csproj": {
"/data/fuxi_ci_workspace/5fd89abc5c740a0a8a7e7090/Core/Core.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/data/fuxi_ci_workspace/5fcde8367ebd0c3984b5d3e9/Core/Core.csproj",
"projectUniqueName": "/data/fuxi_ci_workspace/5fd89abc5c740a0a8a7e7090/Core/Core.csproj",
"projectName": "HuaweiCloud.SDK.Core",
"projectPath": "/data/fuxi_ci_workspace/5fcde8367ebd0c3984b5d3e9/Core/Core.csproj",
"projectPath": "/data/fuxi_ci_workspace/5fd89abc5c740a0a8a7e7090/Core/Core.csproj",
"packagesPath": "/root/.nuget/packages/",
"outputPath": "/data/fuxi_ci_workspace/5fcde8367ebd0c3984b5d3e9/Core/obj/",
"outputPath": "/data/fuxi_ci_workspace/5fd89abc5c740a0a8a7e7090/Core/obj/",
"projectStyle": "PackageReference",
"fallbackFolders": [
"/usr/dotnet/sdk/NuGetFallbackFolder"
Expand All @@ -23,7 +23,7 @@
"netstandard2.0"
],
"sources": {
"/data/fuxi_ci_workspace/5fcde8367ebd0c3984b5d3e9/package": {}
"/data/fuxi_ci_workspace/5fd89abc5c740a0a8a7e7090/package": {}
},
"frameworks": {
"netstandard2.0": {
Expand Down
2 changes: 1 addition & 1 deletion Core/obj/Core.csproj.nuget.g.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">/data/fuxi_ci_workspace/5fcde8367ebd0c3984b5d3e9/Core/obj/project.assets.json</ProjectAssetsFile>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">/data/fuxi_ci_workspace/5fd89abc5c740a0a8a7e7090/Core/obj/project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">/root/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">/root/.nuget/packages/;/usr/dotnet/sdk/NuGetFallbackFolder</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
Expand Down
8 changes: 4 additions & 4 deletions Core/obj/project.assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -3593,11 +3593,11 @@
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/data/fuxi_ci_workspace/5fcde8367ebd0c3984b5d3e9/Core/Core.csproj",
"projectUniqueName": "/data/fuxi_ci_workspace/5fd89abc5c740a0a8a7e7090/Core/Core.csproj",
"projectName": "HuaweiCloud.SDK.Core",
"projectPath": "/data/fuxi_ci_workspace/5fcde8367ebd0c3984b5d3e9/Core/Core.csproj",
"projectPath": "/data/fuxi_ci_workspace/5fd89abc5c740a0a8a7e7090/Core/Core.csproj",
"packagesPath": "/root/.nuget/packages/",
"outputPath": "/data/fuxi_ci_workspace/5fcde8367ebd0c3984b5d3e9/Core/obj/",
"outputPath": "/data/fuxi_ci_workspace/5fd89abc5c740a0a8a7e7090/Core/obj/",
"projectStyle": "PackageReference",
"fallbackFolders": [
"/usr/dotnet/sdk/NuGetFallbackFolder"
Expand All @@ -3609,7 +3609,7 @@
"netstandard2.0"
],
"sources": {
"/data/fuxi_ci_workspace/5fcde8367ebd0c3984b5d3e9/package": {}
"/data/fuxi_ci_workspace/5fd89abc5c740a0a8a7e7090/package": {}
},
"frameworks": {
"netstandard2.0": {
Expand Down
Loading

0 comments on commit ec7bc27

Please sign in to comment.