Skip to content

Commit c3edb21

Browse files
committed
chore: fix-up config comments in examples
1 parent 759c41e commit c3edb21

15 files changed

+91
-70
lines changed

.github/pull_request_template.md

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
11
## PR summary
22
<!-- please include a brief summary of the changes in this PR -->
33

4-
**Fixes:** <! -- link to issue -->
54

65
## PR Checklist
76
Please make sure that your PR fulfills the following requirements:
87
- [ ] The commit message follows the [Angular Commit Message Guidelines](https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-commit-message-guidelines).
98
- [ ] Tests for the changes have been added (for bug fixes / features)
109
- [ ] Docs have been added / updated (for bug fixes / features)
1110

12-
## PR Type
13-
<!-- Please check the one that applies to this PR using "x". -->
14-
- [ ] Bugfix
15-
- [ ] Feature
16-
- [ ] Code style update (formatting, local variables)
17-
- [ ] Refactoring (no functional changes, no api changes)
18-
- [ ] New tests
19-
- [ ] Build/CI related changes
20-
- [ ] Documentation content changes
21-
- [ ] Other (please describe)
22-
23-
## What is the current behavior?
24-
<!-- Please describe the current behavior that you are modifying. -->
25-
26-
## What is the new behavior?
27-
<!-- Please describe the new behavior after your change. -->
11+
## Current vs new behavior
12+
<!-- Please describe the current behavior that you are modifying and the new behavior. -->
2813

2914
## Does this PR introduce a breaking change?
3015
- [ ] Yes

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@ test-unit:
2424
test-int:
2525
python -m pytest test/integration
2626

27+
test-examples:
28+
python -m pytest examples
29+
2730
lint:
2831
./pylint.sh

examples/test_case_management_v1_examples.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,22 @@
2626
#
2727
# This file provides an example of how to use the Case Management service.
2828
#
29+
# The following configuration properties are assumed to be defined:
30+
#
2931
# CASE_MANAGEMENT_URL=<service url>
30-
# CASE_MANAGEMENT_AUTHTYPE=iam
31-
# CASE_MANAGEMENT_APIKEY=<IAM apikey>
32+
# CASE_MANAGEMENT_AUTH_TYPE=iam
3233
# CASE_MANAGEMENT_AUTH_URL=<IAM token service URL - omit this if using the production environment>
33-
# CASE_MANAGEMENT_RESOURCE_CRN=<cloud resource name>
34+
# CASE_MANAGEMENT_APIKEY=<IAM apikey>
35+
# CASE_MANAGEMENT_RESOURCE_CRN=<CRN of resource to use in examples>
36+
#
37+
# These configuration properties can be exported as environment variables, or stored
38+
# in a configuration file and then:
39+
# export IBM_CREDENTIALS_FILE=<name of configuration file>
3440
#
35-
36-
# Config file name
3741
config_file = 'case_management.env'
3842

3943
case_management_service = None
40-
4144
config = None
42-
4345
case_number = None
4446
attachment_id = None
4547
resource_crn = None

examples/test_configuration_governance_v1_examples.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,24 @@
2222
from ibm_cloud_sdk_core import ApiException, read_external_sources
2323
from ibm_platform_services.configuration_governance_v1 import *
2424

25-
# Config file name
25+
#
26+
# This file provides an example of how to use the Configuration Governance service.
27+
#
28+
# The following configuration properties are assumed to be defined:
29+
#
30+
# CONFIGURATION_GOVERNANCE_URL=<service url>
31+
# CONFIGURATION_GOVERNANCE_AUTHTYPE=iam
32+
# CONFIGURATION_GOVERNANCE_APIKEY=<IAM api key of user with authority to create rules>
33+
# CONFIGURATION_GOVERNANCE_AUTH_URL=<IAM token service URL - omit this if using the production environment>
34+
# CONFIGURATION_GOVERNANCE_ACCOUNT_ID=<the id of the account under which rules/attachments should be created>
35+
# CONFIGURATION_GOVERNANCE_EXAMPLE_SERVICE_NAME=<the name of the service to be associated with rule>
36+
# CONFIGURATION_GOVERNANCE_ENTERPRISE_SCOPE_ID=<the id of the "enterprise" scope to be used in the examples>
37+
# CONFIGURATION_GOVERNANCE_SUBACCT_SCOPE_ID=<the id of the "leaf account" scope to be used in the examples>
38+
#
39+
# These configuration properties can be exported as environment variables, or stored
40+
# in a configuration file and then:
41+
# export IBM_CREDENTIALS_FILE=<name of configuration file>
42+
#
2643
config_file = 'configuration_governance.env'
2744

2845
configuration_governance_service = None

examples/test_enterprise_billing_units_v1_examples.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,19 @@
2525
#
2626
# This file provides an example of how to use the Enterprise Billing Units service.
2727
#
28-
# The following configuration properties are assumed to be defined in the external configuration file:
28+
# The following configuration properties are assumed to be defined:
29+
#
2930
# ENTERPRISE_BILLING_UNITS_URL=<service url>
3031
# ENTERPRISE_BILLING_UNITS_AUTHTYPE=iam
3132
# ENTERPRISE_BILLING_UNITS_APIKEY=<your iam apikey>
3233
# ENTERPRISE_BILLING_UNITS_AUTH_URL=<IAM token service URL - omit this if using the production environment>
3334
# ENTERPRISE_BILLING_UNITS_ENTERPRISE_ID=<id of enterprise to use for examples>
3435
# ENTERPRISE_BILLING_UNITS_BILLING_UNIT_ID=<id of billing unit to use for examples>
3536
#
36-
# Config file name
37+
# These configuration properties can be exported as environment variables, or stored
38+
# in a configuration file and then:
39+
# export IBM_CREDENTIALS_FILE=<name of configuration file>
40+
#
3741
config_file = 'enterprise_billing_units.env'
3842

3943
enterprise_billing_units_service = None

examples/test_enterprise_usage_reports_v1_examples.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from ibm_platform_services.enterprise_usage_reports_v1 import *
2424

2525
#
26-
# This file provides an example of how to use the Usage Reports service.
26+
# This file provides an example of how to use the Enterprise Usage Reports service.
2727
#
2828
# The following configuration properties are assumed to be defined:
2929
# ENTERPRISE_USAGE_REPORTS_URL=<service url>
@@ -36,11 +36,9 @@
3636
# ENTERPRISE_USAGE_REPORTS_BILLING_MONTH=<the billing month (yyyy-mm) for which usage info will be retrieved>
3737
#
3838
# These configuration properties can be exported as environment variables, or stored
39-
# in a "credentials" file and then:
40-
# export IBM_CREDENTIALS_FILE=<name of credentials file>
39+
# in a configuration file and then:
40+
# export IBM_CREDENTIALS_FILE=<name of configuration file>
4141
#
42-
43-
# Config file name
4442
config_file = 'enterprise_usage_reports.env'
4543

4644
enterprise_usage_reports_service = None

examples/test_global_catalog_v1_examples.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,17 @@
2626
#
2727
# This file provides an example of how to use the Global Catalog service.
2828
#
29+
# The following configuration properties are assumed to be defined:
30+
#
2931
# GLOBAL_CATALOG_URL=<service url>
3032
# GLOBAL_CATALOG_AUTH_TYPE=iam
3133
# GLOBAL_CATALOG_APIKEY=<IAM apikey>
3234
# GLOBAL_CATALOG_AUTH_URL=<IAM token service URL - omit this if using the production environment>
3335
#
34-
35-
# Config file name
36+
# These configuration properties can be exported as environment variables, or stored
37+
# in a configuration file and then:
38+
# export IBM_CREDENTIALS_FILE=<name of configuration file>
39+
#
3640
config_file = 'global_catalog.env'
3741

3842
global_catalog_service = None

examples/test_global_search_v2_examples.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,21 @@
2121
from ibm_cloud_sdk_core import ApiException, read_external_sources
2222
from ibm_platform_services.global_search_v2 import *
2323

24-
# This file provides an example of how to use the Global Tagging service.
24+
#
25+
# This file provides an example of how to use the Global Search service.
26+
#
27+
# The following configuration properties are assumed to be defined:
2528
#
2629
# The following configuration properties are assumed to be defined in the external configuration file:
27-
# GLOBAL_TAGGING_URL=<service url>
28-
# GLOBAL_TAGGING_AUTHTYPE=iam
29-
# GLOBAL_TAGGING_APIKEY=<IAM api key>
30-
# GLOBAL_TAGGING_AUTH_URL=<IAM token service URL - omit this if using the production environment>
31-
# GLOBAL_TAGGING_RESOURCE_CRN=<the crn of the resource to be used in the examples>
32-
33-
# Config file name
30+
# GLOBAL_SEARCH_URL=<service url>
31+
# GLOBAL_SEARCH_AUTHTYPE=iam
32+
# GLOBAL_SEARCH_APIKEY=<IAM api key>
33+
# GLOBAL_SEARCH_AUTH_URL=<IAM token service URL - omit this if using the production environment>
34+
#
35+
# These configuration properties can be exported as environment variables, or stored
36+
# in a configuration file and then:
37+
# export IBM_CREDENTIALS_FILE=<name of configuration file>
38+
#
3439
config_file = 'global_search.env'
3540

3641
global_search_service = None

examples/test_global_tagging_v1_examples.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,21 @@
2121
from ibm_cloud_sdk_core import ApiException, read_external_sources
2222
from ibm_platform_services.global_tagging_v1 import *
2323

24+
#
2425
# This file provides an example of how to use the Global Tagging service.
2526
#
26-
# The following configuration properties are assumed to be defined in the external configuration file:
27+
# The following configuration properties are assumed to be defined:
28+
#
2729
# GLOBAL_TAGGING_URL=<service url>
2830
# GLOBAL_TAGGING_AUTHTYPE=iam
2931
# GLOBAL_TAGGING_APIKEY=<IAM api key>
3032
# GLOBAL_TAGGING_AUTH_URL=<IAM token service URL - omit this if using the production environment>
3133
# GLOBAL_TAGGING_RESOURCE_CRN=<the crn of the resource to be used in the examples>
32-
33-
# Config file name
34+
#
35+
# These configuration properties can be exported as environment variables, or stored
36+
# in a configuration file and then:
37+
# export IBM_CREDENTIALS_FILE=<name of configuration file>
38+
#
3439
config_file = 'global_tagging.env'
3540

3641
global_tagging_service = None

examples/test_iam_access_groups_v2_examples.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,18 @@
2525
#
2626
# This file provides an example of how to use the IAM Access Groups service.
2727
#
28-
# The following configuration properties are assumed to be defined in the external configuration file:
28+
# The following configuration properties are assumed to be defined:
29+
#
2930
# IAM_ACCESS_GROUPS_URL=<service url>
3031
# IAM_ACCESS_GROUPS_AUTHTYPE=iam
3132
# IAM_ACCESS_GROUPS_APIKEY=<your iam apikey>
3233
# IAM_ACCESS_GROUPS_AUTH_URL=<IAM token service URL - omit this if using the production environment>
3334
# IAM_ACCESS_GROUPS_TEST_ACCOUNT_ID=<id of an account used for testing>
3435
#
35-
36-
# Config file name
36+
# These configuration properties can be exported as environment variables, or stored
37+
# in a configuration file and then:
38+
# export IBM_CREDENTIALS_FILE=<name of configuration file>
39+
#
3740
config_file = 'iam_access_groups.env'
3841

3942
iam_access_groups_service = None

examples/test_iam_identity_v1_examples.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from ibm_platform_services.iam_identity_v1 import *
2525

2626
#
27-
# This file provides an example of how to use the IAM-IDENTITY service.
27+
# This file provides an example of how to use the IAM Identity service.
2828
#
2929
# The following configuration properties are assumed to be defined:
3030
#
@@ -36,11 +36,9 @@
3636
# IAM_IDENTITY_IAM_ID=<IAM ID which is unique to the User account>
3737
#
3838
# These configuration properties can be exported as environment variables, or stored
39-
# in a "credentials" file and then:
40-
# export IBM_CREDENTIALS_FILE=<name of credentials file>
39+
# in a configuration file and then:
40+
# export IBM_CREDENTIALS_FILE=<name of configuration file>
4141
#
42-
43-
# Config file name
4442
config_file = 'iam_identity.env'
4543

4644
iam_identity_service = None

examples/test_open_service_broker_v1_examples.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222
from ibm_cloud_sdk_core import ApiException, read_external_sources
2323
from ibm_platform_services.open_service_broker_v1 import *
2424

25-
# Config file name
26-
config_file = 'open_service_broker.env'
27-
2825
#
2926
# This file provides an example of how to use the Open Service Broker service.
3027
#
@@ -44,9 +41,10 @@
4441
# OPEN_SERVICE_BROKER_ORGANIZATION_GUID=<The IBM Cloud platform GUID for the organization under which the service instance is to be provisioned>
4542
#
4643
# These configuration properties can be exported as environment variables, or stored
47-
# in a "credentials" file and then:
48-
# export IBM_CREDENTIALS_FILE=<name of credentials file>
44+
# in a configuration file and then:
45+
# export IBM_CREDENTIALS_FILE=<name of configuration file>
4946
#
47+
config_file = 'open_service_broker.env'
5048

5149
open_service_broker_service = None
5250

examples/test_resource_controller_v2_examples.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
from ibm_cloud_sdk_core import ApiException, read_external_sources
2424
from ibm_platform_services.resource_controller_v2 import *
2525

26-
# Config file name
27-
config_file = 'resource_controller.env'
28-
2926
#
3027
# This file provides an example of how to use the Resource Controller service.
3128
#
@@ -42,9 +39,10 @@
4239
# RESOURCE_CONTROLLER_BINDING_TARGET_CRN=<The CRN of application to bind to in a specific environment>
4340
#
4441
# These configuration properties can be exported as environment variables, or stored
45-
# in a "credentials" file and then:
46-
# export IBM_CREDENTIALS_FILE=<name of credentials file>
42+
# in a configuration file and then:
43+
# export IBM_CREDENTIALS_FILE=<name of configuration file>
4744
#
45+
config_file = 'resource_controller.env'
4846

4947
resource_controller_service = None
5048

examples/test_usage_metering_v4_examples.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@
2525
#
2626
# This file provides an example of how to use the Usage Metering service.
2727
#
28-
# The following configuration properties are assumed to be defined in the external configuration file:
28+
# The following configuration properties are assumed to be defined:
29+
#
2930
# USAGE_METERING_URL=<service url>
3031
# USAGE_METERING_AUTHTYPE=iam
3132
# USAGE_METERING_APIKEY=<your iam apikey>
3233
# USAGE_METERING_AUTH_URL=<IAM token service URL - omit this if using the production environment>
3334
#
34-
35-
# Config file name
35+
# These configuration properties can be exported as environment variables, or stored
36+
# in a configuration file and then:
37+
# export IBM_CREDENTIALS_FILE=<name of configuration file>
38+
#
3639
config_file = 'usage_metering.env'
3740

3841
usage_metering_service = None

examples/test_usage_reports_v4_examples.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,9 @@
3636
# USAGE_REPORTS_BILLING_MONTH=<the billing month (yyyy-mm) for which usage info will be retrieved>
3737
#
3838
# These configuration properties can be exported as environment variables, or stored
39-
# in a "credentials" file and then:
40-
# export IBM_CREDENTIALS_FILE=<name of credentials file>
39+
# in a configuration file and then:
40+
# export IBM_CREDENTIALS_FILE=<name of configuration file>
4141
#
42-
43-
# Config file name
4442
config_file = 'usage_reports.env'
4543

4644
usage_reports_service = None

0 commit comments

Comments
 (0)