Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ package-lock.json
node_modules/

# ignore the generated integration test files, as they cannot be used without manual editing
integration/test_code_engine_v2.py
test/integration/test_code_engine_v2.py
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ all: upgrade_pip setup test-unit lint
ci: setup test-unit lint

upgrade_pip:
python -m pip install --upgrade pip
python3 -m pip install --upgrade pip

deps:
python -m pip install -r requirements.txt
python3 -m pip install -r requirements.txt

dev_deps:
python -m pip install -r requirements-dev.txt
python3 -m pip install -r requirements-dev.txt

install_project:
python -m pip install -e .
python3 -m pip install -e .

test: test-unit test-int

test-unit:
python -m pytest --cov=ibm_code_engine_sdk test/unit
python3 -m pytest --cov=ibm_code_engine_sdk test/unit

test-int:
python -m pytest test/integration
python3 -m pytest test/integration

test-examples:
python -m pytest example
python3 -m pytest example

lint:
./pylint.sh && black --check .
Expand Down
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
<!--
[![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)
-->

# Python SDK for IBM Cloud Code Engine 2.0.3
# Python SDK for IBM Cloud Code Engine 3.1.0

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

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

<!-- toc -->

- [Overview](#overview)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Using the SDK](#using-the-sdk)
- [Questions](#questions)
- [Issues](#issues)
- [Open source @ IBM](#open-source--ibm)
- [Contributing](#contributing)
- [License](#license)
- [Python SDK for IBM Cloud Code Engine 3.1.0](#python-sdk-for-ibm-cloud-code-engine-310)
- [Table of Contents](#table-of-contents)
- [Overview](#overview)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Using the SDK](#using-the-sdk)
- [Questions](#questions)
- [Issues](#issues)
- [Open source @ IBM](#open-source--ibm)
- [Contributing](#contributing)
- [License](#license)

<!-- tocstop -->

Expand All @@ -40,8 +41,8 @@ IBM Cloud services:

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

## Prerequisites

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

```bash
pip install --upgrade "ibm_code_engine_sdk>=2.0.3"
pip install --upgrade "ibm_code_engine_sdk>=3.1.0"
```

or

```bash
easy_install --upgrade "ibm_code_engine_sdk>=2.0.3"
easy_install --upgrade "ibm_code_engine_sdk>=3.1.0"
```

## Using the SDK
Expand Down
31 changes: 26 additions & 5 deletions examples/test_code_engine_v2_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,27 @@ def test_get_project_example(self):
except ApiException as e:
pytest.fail(str(e))

@needscredentials
def test_get_project_egress_ips_example(self):
"""
get_project_egress_ips request example
"""
try:
print('\nget_project_egress_ips() result:')
# begin-get_project_egress_ips

response = code_engine_service.get_project_egress_ips(
project_id='15314cc3-85b4-4338-903f-c28cdee6d005',
)
project_egress_ip_addresses = response.get_result()

print(json.dumps(project_egress_ip_addresses, indent=2))

# end-get_project_egress_ips

except ApiException as e:
pytest.fail(str(e))

@needscredentials
def test_list_apps_example(self):
"""
Expand Down Expand Up @@ -277,7 +298,7 @@ def test_get_app_revision_example(self):
response = code_engine_service.get_app_revision(
project_id='15314cc3-85b4-4338-903f-c28cdee6d005',
app_name='my-app',
name='my-app-001',
name='my-app-00001',
)
app_revision = response.get_result()

Expand Down Expand Up @@ -444,7 +465,7 @@ def test_get_job_run_example(self):

response = code_engine_service.get_job_run(
project_id='15314cc3-85b4-4338-903f-c28cdee6d005',
name='my-job',
name='my-job-run',
)
job_run = response.get_result()

Expand Down Expand Up @@ -662,7 +683,7 @@ def test_create_config_map_example(self):

response = code_engine_service.create_config_map(
project_id='15314cc3-85b4-4338-903f-c28cdee6d005',
name='my-configmap',
name='my-config-map',
)
config_map = response.get_result()

Expand Down Expand Up @@ -860,7 +881,7 @@ def test_delete_app_revision_example(self):
response = code_engine_service.delete_app_revision(
project_id='15314cc3-85b4-4338-903f-c28cdee6d005',
app_name='my-app',
name='my-app-001',
name='my-app-00001',
)

# end-delete_app_revision
Expand Down Expand Up @@ -898,7 +919,7 @@ def test_delete_job_run_example(self):

response = code_engine_service.delete_job_run(
project_id='15314cc3-85b4-4338-903f-c28cdee6d005',
name='my-job',
name='my-job-run',
)

# end-delete_job_run
Expand Down
Loading