Skip to content

Commit ea719c5

Browse files
authored
add ucloudstack product and improve testing (#50)
FEATURES: - Add `ucloudstack` product ENHANCEMENTS: - Add `deprecated` decorator
1 parent e69002c commit ea719c5

File tree

14 files changed

+7184
-17
lines changed

14 files changed

+7184
-17
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!--- Information about referencing Github Issues: https://help.github.com/articles/basic-writing-and-formatting-syntax/#referencing-issues-and-pull-requests --->
2+
3+
FEATURES:
4+
5+
ENHANCEMENTS:
6+
7+
BUG FIXES:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,4 @@ bdd/
116116
.version
117117

118118
scripts/gen-apis.sh
119+
report.json

docs/services.rst

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ USMS
7979
.. autoclass:: ucloud.services.usms.client.USMSClient
8080
:members:
8181

82+
VPC
83+
---
84+
85+
.. autoclass:: ucloud.services.vpc.client.VPCClient
86+
:members:
87+
8288

8389

8490
IPSecVPN
@@ -88,6 +94,13 @@ IPSecVPN
8894
:members:
8995

9096

97+
UCloudStack
98+
-----------
99+
100+
.. autoclass:: ucloud.services.ucloudstack.client.UCloudStackClient
101+
:members:
102+
103+
91104
UFS
92105
---
93106

@@ -101,10 +114,3 @@ UHub
101114
.. autoclass:: ucloud.services.uhub.client.UHubClient
102115
:members:
103116

104-
105-
VPC
106-
---
107-
108-
.. autoclass:: ucloud.services.vpc.client.VPCClient
109-
:members:
110-

tests/test_acceptance/conftest.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,22 @@
66
from ucloud.client import Client
77

88

9-
@pytest.fixture(scope="session", autouse=True, name="client")
10-
def client_factory() -> Client:
9+
@pytest.fixture(scope="session", autouse=True)
10+
def ustack_client() -> Client:
11+
return Client(
12+
{
13+
"base_url": "http://192.168.179.2/api",
14+
"region": "cn",
15+
"public_key": os.getenv("UCLOUDSTACK_PUBLIC_KEY"),
16+
"private_key": os.getenv("UCLOUDSTACK_PRIVATE_KEY"),
17+
"max_retries": 10,
18+
"timeout": 60,
19+
}
20+
)
21+
22+
23+
@pytest.fixture(scope="session", autouse=True)
24+
def client() -> Client:
1125
return Client(
1226
{
1327
"region": "cn-bj2",

0 commit comments

Comments
 (0)