Skip to content

Commit 81ef3d5

Browse files
committed
release 0.0.6-beta source code for java
1 parent 0d0225e commit 81ef3d5

File tree

75 files changed

+1452
-4066
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1452
-4066
lines changed

CHANGELOG.md

Lines changed: 172 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,175 @@
1+
# 0.0.6-beta 2023-05-12
2+
3+
### G42Cloud SDK CBR
4+
5+
- _Features_
6+
- None
7+
- _Bug Fix_
8+
- None
9+
- _Change_
10+
- Remove the following interfaces:
11+
- `CopyCheckpoint`
12+
- `MigrateVaultResource`
13+
- `ImportBackup`
14+
- `CopyBackup`
15+
- `ShowReplicationCapabilities`
16+
- **ShowVaultResourceInstances**
17+
- changes of response param
18+
- `* resources.resource_detail: list<Vault> -> object<InstancesResourceDetail>`
19+
- **ShowBackup**
20+
- changes of response param
21+
- `- backup.image_type: enum value [backup,replication]`
22+
- `- backup.resource_type: enum value [OS::Nova::Server,OS::Cinder::Volume]`
23+
- **ListBackups**
24+
- changes of request param
25+
- `+ incremental`
26+
- `+ image_type: enum value [backup,replication]`
27+
- `+ resource_type: enum value [OS::Cinder::Volume,OS::Nova::Server]`
28+
- changes of response param
29+
- `- backups.image_type: enum value [backup,replication]`
30+
- `- backups.resource_type: enum value [OS::Nova::Server,OS::Cinder::Volume]`
31+
- **ListPolicies**
32+
- changes of response param
33+
- `- policies.operation_type: enum value [replication]`
34+
- **CreatePolicy**
35+
- changes of request param
36+
- `- policy.operation_type: enum value [backup,replication]`
37+
- changes of response param
38+
- `- policy.operation_type: enum value [replication]`
39+
- **ShowPolicy**
40+
- changes of response param
41+
- `- policy.operation_type: enum value [replication]`
42+
- **UpdatePolicy**
43+
- changes of response param
44+
- `- policy.operation_type: enum value [replication]`
45+
- **ListVault**
46+
- changes of request param
47+
- `+ cloud_type: enum value [public,hybrid]`
48+
- `+ protect_type: enum value [backup,replication]`
49+
- changes of response param
50+
- `- vaults.billing.charging_mode: enum value [pre_paid,post_paid]`
51+
- `- vaults.billing.cloud_type: enum value [public,hybrid]`
52+
- `- vaults.billing.consistent_level: enum value [app_consistent,crash_consistent]`
53+
- `- vaults.billing.object_type: enum value [server,disk]`
54+
- `- vaults.billing.protect_type: enum value [backup,replication,hybrid]`
55+
- `- vaults.billing.spec_code: enum value [vault.backup.server.normal,vault.backup.volume.normal]`
56+
- `* vaults.bind_rules.tags: list<Tag> -> list<BindRulesTags>`
57+
- **CreateVault**
58+
- changes of request param
59+
- `* vault.bind_rules.tags: list<Tag> -> list<BindRulesTags>`
60+
- `+ vault.billing.promotion_info`
61+
- `+ vault.billing.purchase_mode`
62+
- `+ vault.billing.order_id`
63+
- `- vault.billing.cloud_type: enum value [public,hybrid]`
64+
- `- vault.billing.consistent_level: enum value [app_consistent,crash_consistent]`
65+
- `- vault.billing.object_type: enum value [server,disk,turbo]`
66+
- `- vault.billing.protect_type: enum value [backup,replication]`
67+
- `- vault.billing.charging_mode: enum value [post_paid,pre_paid]`
68+
- changes of response param
69+
- `- vault.billing.charging_mode: enum value [pre_paid,post_paid]`
70+
- `- vault.billing.cloud_type: enum value [public,hybrid]`
71+
- `- vault.billing.consistent_level: enum value [app_consistent,crash_consistent]`
72+
- `- vault.billing.object_type: enum value [server,disk]`
73+
- `- vault.billing.protect_type: enum value [backup,replication,hybrid]`
74+
- `- vault.billing.spec_code: enum value [vault.backup.server.normal,vault.backup.volume.normal]`
75+
- `* vault.bind_rules.tags: list<Tag> -> list<BindRulesTags>`
76+
- **ShowVault**
77+
- changes of response param
78+
- `- vault.billing.charging_mode: enum value [pre_paid,post_paid]`
79+
- `- vault.billing.cloud_type: enum value [public,hybrid]`
80+
- `- vault.billing.consistent_level: enum value [app_consistent,crash_consistent]`
81+
- `- vault.billing.object_type: enum value [server,disk]`
82+
- `- vault.billing.protect_type: enum value [backup,replication,hybrid]`
83+
- `- vault.billing.spec_code: enum value [vault.backup.server.normal,vault.backup.volume.normal]`
84+
- `* vault.bind_rules.tags: list<Tag> -> list<BindRulesTags>`
85+
- **UpdateVault**
86+
- changes of request param
87+
- `* vault.bind_rules.tags: list<Tag> -> list<BindRulesTags>`
88+
- changes of response param
89+
- `- vault.billing.charging_mode: enum value [pre_paid,post_paid]`
90+
- `- vault.billing.cloud_type: enum value [public,hybrid]`
91+
- `- vault.billing.consistent_level: enum value [app_consistent,crash_consistent]`
92+
- `- vault.billing.object_type: enum value [server,disk]`
93+
- `- vault.billing.protect_type: enum value [backup,replication,hybrid]`
94+
- `- vault.billing.spec_code: enum value [vault.backup.server.normal,vault.backup.volume.normal]`
95+
- `* vault.bind_rules.tags: list<Tag> -> list<BindRulesTags>`
96+
- **ListProtectable**
97+
- changes of response param
98+
- `- instances.protectable.vault.billing.charging_mode: enum value [pre_paid,post_paid]`
99+
- `- instances.protectable.vault.billing.cloud_type: enum value [public,hybrid]`
100+
- `- instances.protectable.vault.billing.consistent_level: enum value [app_consistent,crash_consistent]`
101+
- `- instances.protectable.vault.billing.object_type: enum value [server,disk]`
102+
- `- instances.protectable.vault.billing.protect_type: enum value [backup,replication,hybrid]`
103+
- `- instances.protectable.vault.billing.spec_code: enum value [vault.backup.server.normal,vault.backup.volume.normal]`
104+
- `+ instances.protectable.vault.tags.value`
105+
- `- instances.protectable.vault.tags.values`
106+
- `* instances.protectable.vault.tags: list<TagsResp> -> list<Tag>`
107+
- `* instances.protectable.vault.bind_rules.tags: list<Tag> -> list<BindRulesTags>`
108+
- **ShowProtectable**
109+
- changes of response param
110+
- `- instance.protectable.vault.billing.charging_mode: enum value [pre_paid,post_paid]`
111+
- `- instance.protectable.vault.billing.cloud_type: enum value [public,hybrid]`
112+
- `- instance.protectable.vault.billing.consistent_level: enum value [app_consistent,crash_consistent]`
113+
- `- instance.protectable.vault.billing.object_type: enum value [server,disk]`
114+
- `- instance.protectable.vault.billing.protect_type: enum value [backup,replication,hybrid]`
115+
- `- instance.protectable.vault.billing.spec_code: enum value [vault.backup.server.normal,vault.backup.volume.normal]`
116+
- `+ instance.protectable.vault.tags.value`
117+
- `- instance.protectable.vault.tags.values`
118+
- `* instance.protectable.vault.tags: list<TagsResp> -> list<Tag>`
119+
- `* instance.protectable.vault.bind_rules.tags: list<Tag> -> list<BindRulesTags>`
120+
121+
### G42Cloud SDK ECS
122+
123+
- _Features_
124+
- Support the interface `NovaAttachInterface`
125+
- _Bug Fix_
126+
- None
127+
- _Change_
128+
- None
129+
130+
### G42Cloud SDK IMS
131+
132+
- _Features_
133+
- None
134+
- _Bug Fix_
135+
- None
136+
- _Change_
137+
- **ListImages**
138+
- changes of request param
139+
- `+ __imagetype: enum value [market]`
140+
141+
### G42Cloud SDK RDS
142+
143+
- _Features_
144+
- None
145+
- _Bug Fix_
146+
- None
147+
- _Change_
148+
- **ListRestoreTimes**
149+
- changes of response param
150+
- `* restore_time.start_time: int32 -> int64`
151+
- `* restore_time.end_time: int32 -> int64`
152+
- **ListOffSiteRestoreTimes**
153+
- changes of response param
154+
- `* restore_time.start_time: int32 -> int64`
155+
- `* restore_time.end_time: int32 -> int64`
156+
- **RestoreToExistingInstance**
157+
- changes of request param
158+
- `* source.restore_time: int32 -> int64`
159+
- **RestoreExistInstance**
160+
- changes of request param
161+
- `* source.restore_time: int32 -> int64`
162+
- **CreateInstance**
163+
- changes of request param
164+
- `* restore_point.restore_time: int32 -> int64`
165+
- changes of response param
166+
- `* instance.restore_point.restore_time: int32 -> int64`
167+
- **CreateRestoreInstance**
168+
- changes of request param
169+
- `* restore_point.restore_time: int32 -> int64`
170+
- changes of response param
171+
- `* instance.restore_point.restore_time: int32 -> int64`
172+
1173
# 0.0.5-beta 2023-04-14
2174

3175
### G42Cloud SDK Core

README.md

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ SDK supports `Access` log and `Debug` log which could be configured manually.
357357
#### 6.1 Access Log [:top:](#user-manual-top)
358358

359359
**Notice:**
360-
When running SDK, slf4j is used for printing log. If the log implementation library is not configured when running the
360+
When running SDK, slf4j implementation library is used for printing log. If the log implementation library is not configured when running the
361361
code example, and it prompts as follows:
362362

363363
``` shell
@@ -366,41 +366,54 @@ SLF4J: Defaulting to no-operation (NOP) logger implementation
366366
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
367367
```
368368

369+
*For more, refer to [Frequently Asked Questions about SLF4J](https://www.slf4j.org/faq.html)*
370+
371+
The version between slf4j supported by the SDK and the corresponding log implementation is shown in the following table:
372+
373+
| slf4j-api | logback-classic | slf4j-log4j12 | slf4j-simple | slf4j-jdk14 |
374+
|-----------|-----------------|---------------|--------------|-------------|
375+
| 1.7.x | 1.2.x | 1.6.x/1.7.x | 1.6.x/1.7.x | 1.6.x/1.7.x |
376+
369377
You can add corresponding library for log implementation according to actual situation of your target project. For
370378
example, you can add one of the following dependency to your **pom.xml** file:
371379

372-
**slf4j**
380+
**logback**
373381

374382
``` xml
375383
<dependency>
376-
<groupId>org.slf4j</groupId>
377-
<artifactId>slf4j-simple</artifactId>
378-
<version>1.7.21</version>
384+
<groupId>ch.qos.logback</groupId>
385+
<artifactId>logback-classic</artifactId>
386+
<version>1.2.12</version>
379387
</dependency>
380388
```
381389

382-
**logback**
390+
**log4j**
383391

384392
``` xml
385393
<dependency>
386-
<groupId>ch.qos.logback</groupId>
387-
<artifactId>logback-classic</artifactId>
388-
<version>1.2.3</version>
394+
<groupId>org.slf4j</groupId>
395+
<artifactId>slf4j-log4j12</artifactId>
396+
<version>1.7.36</version>
389397
</dependency>
398+
```
399+
400+
**slf4j simple**
401+
402+
``` xml
390403
<dependency>
391-
<groupId>ch.qos.logback</groupId>
392-
<artifactId>logback-core</artifactId>
393-
<version>1.2.3</version>
404+
<groupId>org.slf4j</groupId>
405+
<artifactId>slf4j-simple</artifactId>
406+
<version>1.7.36</version>
394407
</dependency>
395408
```
396409

397-
**log4j**
410+
**jul**
398411

399412
``` xml
400413
<dependency>
401-
<groupId>log4j</groupId>
402-
<artifactId>log4j</artifactId>
403-
<version>1.2.17</version>
414+
<groupId>org.slf4j</groupId>
415+
<artifactId>slf4j-jdk14</artifactId>
416+
<version>1.7.36</version>
404417
</dependency>
405418
```
406419

core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55

66
<parent>
77
<groupId>io.github.g42cloud-sdk</groupId>
8-
<version>0.0.5-beta</version>
8+
<version>0.0.6-beta</version>
99
<artifactId>g42cloud-sdk</artifactId>
1010
</parent>
1111

1212
<modelVersion>4.0.0</modelVersion>
1313
<packaging>jar</packaging>
1414
<artifactId>g42cloud-sdk-core</artifactId>
15-
<version>0.0.5-beta</version>
15+
<version>0.0.6-beta</version>
1616
<name>G42 Cloud SDK for Java Core</name>
1717
<description>Core library for G42 Cloud Java SDK</description>
1818
<url>https://github.com/g42cloud-sdk/g42cloud-sdk-java</url>

core/src/main/java/com/g42cloud/sdk/core/HcClient.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,9 @@ private <ReqT, ResT> ResT extractResponse(HttpResponse httpResponse, HttpRequest
393393
|| respContentType.startsWith(Constants.MEDIATYPE.IMAGE)
394394
|| respContentType.startsWith(Constants.MEDIATYPE.APPLICATION_BSON))) {
395395
resT = reqDef.getResponseType().newInstance();
396-
resT = CastUtils.cast(((SdkStreamResponse) resT).parseBody(httpResponse.getBody()));
396+
if (resT instanceof SdkStreamResponse) {
397+
resT = CastUtils.cast(((SdkStreamResponse) resT).parseBody(httpResponse.getBody()));
398+
}
397399
} else {
398400
if (SdkSerializable.class.isAssignableFrom(reqDef.getResponseType())) {
399401
resT = deserializeSerializableResponse(reqDef.getResponseType(), stringResult);

pom.xml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<packaging>pom</packaging>
88
<groupId>io.github.g42cloud-sdk</groupId>
99
<artifactId>g42cloud-sdk</artifactId>
10-
<version>0.0.5-beta</version>
10+
<version>0.0.6-beta</version>
1111
<name>G42 Cloud SDK for Java Parent</name>
1212
<description>G42 Cloud SDK for Java</description>
1313
<url>https://github.com/g42cloud-sdk/g42cloud-sdk-java</url>
@@ -36,14 +36,14 @@
3636

3737
<properties>
3838
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
39-
<revision>0.0.5-beta</revision>
39+
<revision>0.0.6-beta</revision>
4040
<snakeyaml.version>2.0</snakeyaml.version>
4141
<jackson.version>2.14.2</jackson.version>
4242
<okhttp.version>3.14.9</okhttp.version>
4343
<bgmprovider.version>1.0.6</bgmprovider.version>
4444
<junit.version>4.13.1</junit.version>
45-
<slf4j.version>1.7.32</slf4j.version>
46-
<logback.version>1.2.9</logback.version>
45+
<slf4j.version>1.7.36</slf4j.version>
46+
<logback.version>1.2.12</logback.version>
4747
<wiremock.version>2.26.3</wiremock.version>
4848
</properties>
4949

@@ -100,12 +100,6 @@
100100
<version>${logback.version}</version>
101101
<scope>test</scope>
102102
</dependency>
103-
<dependency>
104-
<groupId>ch.qos.logback</groupId>
105-
<artifactId>logback-core</artifactId>
106-
<version>${logback.version}</version>
107-
<scope>test</scope>
108-
</dependency>
109103
<dependency>
110104
<groupId>com.github.tomakehurst</groupId>
111105
<artifactId>wiremock-jre8</artifactId>

services/bms/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<parent>
55
<groupId>io.github.g42cloud-sdk</groupId>
6-
<version>0.0.5-beta</version>
6+
<version>0.0.6-beta</version>
77
<artifactId>g42cloud-sdk-services</artifactId>
88
<relativePath>..</relativePath>
99
</parent>
1010
<artifactId>g42cloud-sdk-bms</artifactId>
11-
<version>0.0.5-beta</version>
11+
<version>0.0.6-beta</version>
1212
<name>G42 Cloud SDK for BMS</name>
1313

1414
<modelVersion>4.0.0</modelVersion>
@@ -17,7 +17,7 @@
1717
<dependency>
1818
<groupId>io.github.g42cloud-sdk</groupId>
1919
<artifactId>g42cloud-sdk-core</artifactId>
20-
<version>0.0.5-beta</version>
20+
<version>0.0.6-beta</version>
2121
</dependency>
2222
</dependencies>
2323

services/cbr/pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<parent>
55
<groupId>io.github.g42cloud-sdk</groupId>
6-
<version>0.0.5-beta</version>
6+
<version>0.0.6-beta</version>
77
<artifactId>g42cloud-sdk-services</artifactId>
88
<relativePath>..</relativePath>
99
</parent>
1010
<artifactId>g42cloud-sdk-cbr</artifactId>
11-
<version>0.0.5-beta</version>
11+
<version>0.0.6-beta</version>
1212
<name>G42 Cloud SDK for CBR</name>
1313

1414
<modelVersion>4.0.0</modelVersion>
@@ -17,7 +17,7 @@
1717
<dependency>
1818
<groupId>io.github.g42cloud-sdk</groupId>
1919
<artifactId>g42cloud-sdk-core</artifactId>
20-
<version>0.0.5-beta</version>
20+
<version>0.0.6-beta</version>
2121
</dependency>
2222
</dependencies>
2323

0 commit comments

Comments
 (0)