Skip to content

Commit 48f04cf

Browse files
authored
Merge pull request #7 from IBM/sdk-update-20230327-122344
Sdk update 20230327 122344
2 parents 78cc4c8 + 77f7cdd commit 48f04cf

File tree

10 files changed

+1623
-866
lines changed

10 files changed

+1623
-866
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,4 @@ package-lock.json
8282
node_modules/
8383

8484
# ignore the generated integration test files, as they cannot be used without manual editing
85-
integration/test_code_engine_v2.py
85+
test/integration/test_code_engine_v2.py

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ all: upgrade_pip setup test-unit lint
99
ci: setup test-unit lint
1010

1111
upgrade_pip:
12-
python -m pip install --upgrade pip
12+
python3 -m pip install --upgrade pip
1313

1414
deps:
15-
python -m pip install -r requirements.txt
15+
python3 -m pip install -r requirements.txt
1616

1717
dev_deps:
18-
python -m pip install -r requirements-dev.txt
18+
python3 -m pip install -r requirements-dev.txt
1919

2020
install_project:
21-
python -m pip install -e .
21+
python3 -m pip install -e .
2222

2323
test: test-unit test-int
2424

2525
test-unit:
26-
python -m pytest --cov=ibm_code_engine_sdk test/unit
26+
python3 -m pytest --cov=ibm_code_engine_sdk test/unit
2727

2828
test-int:
29-
python -m pytest test/integration
29+
python3 -m pytest test/integration
3030

3131
test-examples:
32-
python -m pytest example
32+
python3 -m pytest example
3333

3434
lint:
3535
./pylint.sh && black --check .

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
<!--
33
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
44
-->
5-
6-
# Python SDK for IBM Cloud Code Engine 2.0.3
5+
# Python SDK for IBM Cloud Code Engine 3.1.0
76

87
Python client library to interact with the [IBM Cloud Code Engine API](https://cloud.ibm.com/apidocs/codeengine).
98

@@ -21,15 +20,17 @@ Python client library to interact with the [IBM Cloud Code Engine API](https://c
2120

2221
<!-- toc -->
2322

24-
- [Overview](#overview)
25-
- [Prerequisites](#prerequisites)
26-
- [Installation](#installation)
27-
- [Using the SDK](#using-the-sdk)
28-
- [Questions](#questions)
29-
- [Issues](#issues)
30-
- [Open source @ IBM](#open-source--ibm)
31-
- [Contributing](#contributing)
32-
- [License](#license)
23+
- [Python SDK for IBM Cloud Code Engine 3.1.0](#python-sdk-for-ibm-cloud-code-engine-310)
24+
- [Table of Contents](#table-of-contents)
25+
- [Overview](#overview)
26+
- [Prerequisites](#prerequisites)
27+
- [Installation](#installation)
28+
- [Using the SDK](#using-the-sdk)
29+
- [Questions](#questions)
30+
- [Issues](#issues)
31+
- [Open source @ IBM](#open-source--ibm)
32+
- [Contributing](#contributing)
33+
- [License](#license)
3334

3435
<!-- tocstop -->
3536

@@ -40,8 +41,8 @@ IBM Cloud services:
4041

4142
Service Name | Imported Class Name
4243
--- | ---
43-
[IBM Cloud Code Engine V2](https://cloud.ibm.com/apidocs/codeengine/codeengine-v2.0.3) | CodeEngineV2
44-
[IBM Cloud Code Engine V1](https://cloud.ibm.com/apidocs/codeengine/codeengine-v1.0.0) | IbmCloudCodeEngineV1
44+
[IBM Cloud Code Engine V2](https://cloud.ibm.com/apidocs/codeengine/codeengine-v3.1.0) | CodeEngineV2
45+
[IBM Cloud Code Engine V1](https://cloud.ibm.com/apidocs/codeengine/codeengine-v3.1.0) | IbmCloudCodeEngineV1
4546

4647
## Prerequisites
4748

@@ -56,13 +57,13 @@ Service Name | Imported Class Name
5657
To install, use `pip` or `easy_install`:
5758

5859
```bash
59-
pip install --upgrade "ibm_code_engine_sdk>=2.0.3"
60+
pip install --upgrade "ibm_code_engine_sdk>=3.1.0"
6061
```
6162

6263
or
6364

6465
```bash
65-
easy_install --upgrade "ibm_code_engine_sdk>=2.0.3"
66+
easy_install --upgrade "ibm_code_engine_sdk>=3.1.0"
6667
```
6768

6869
## Using the SDK

examples/test_code_engine_v2_examples.py

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,27 @@ def test_get_project_example(self):
141141
except ApiException as e:
142142
pytest.fail(str(e))
143143

144+
@needscredentials
145+
def test_get_project_egress_ips_example(self):
146+
"""
147+
get_project_egress_ips request example
148+
"""
149+
try:
150+
print('\nget_project_egress_ips() result:')
151+
# begin-get_project_egress_ips
152+
153+
response = code_engine_service.get_project_egress_ips(
154+
project_id='15314cc3-85b4-4338-903f-c28cdee6d005',
155+
)
156+
project_egress_ip_addresses = response.get_result()
157+
158+
print(json.dumps(project_egress_ip_addresses, indent=2))
159+
160+
# end-get_project_egress_ips
161+
162+
except ApiException as e:
163+
pytest.fail(str(e))
164+
144165
@needscredentials
145166
def test_list_apps_example(self):
146167
"""
@@ -277,7 +298,7 @@ def test_get_app_revision_example(self):
277298
response = code_engine_service.get_app_revision(
278299
project_id='15314cc3-85b4-4338-903f-c28cdee6d005',
279300
app_name='my-app',
280-
name='my-app-001',
301+
name='my-app-00001',
281302
)
282303
app_revision = response.get_result()
283304

@@ -444,7 +465,7 @@ def test_get_job_run_example(self):
444465

445466
response = code_engine_service.get_job_run(
446467
project_id='15314cc3-85b4-4338-903f-c28cdee6d005',
447-
name='my-job',
468+
name='my-job-run',
448469
)
449470
job_run = response.get_result()
450471

@@ -662,7 +683,7 @@ def test_create_config_map_example(self):
662683

663684
response = code_engine_service.create_config_map(
664685
project_id='15314cc3-85b4-4338-903f-c28cdee6d005',
665-
name='my-configmap',
686+
name='my-config-map',
666687
)
667688
config_map = response.get_result()
668689

@@ -860,7 +881,7 @@ def test_delete_app_revision_example(self):
860881
response = code_engine_service.delete_app_revision(
861882
project_id='15314cc3-85b4-4338-903f-c28cdee6d005',
862883
app_name='my-app',
863-
name='my-app-001',
884+
name='my-app-00001',
864885
)
865886

866887
# end-delete_app_revision
@@ -898,7 +919,7 @@ def test_delete_job_run_example(self):
898919

899920
response = code_engine_service.delete_job_run(
900921
project_id='15314cc3-85b4-4338-903f-c28cdee6d005',
901-
name='my-job',
922+
name='my-job-run',
902923
)
903924

904925
# end-delete_job_run

0 commit comments

Comments
 (0)