Skip to content

chore: fix-up config comments in examples #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2021
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
19 changes: 2 additions & 17 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,15 @@
## PR summary
<!-- please include a brief summary of the changes in this PR -->

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

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

## PR Type
<!-- Please check the one that applies to this PR using "x". -->
- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] New tests
- [ ] Build/CI related changes
- [ ] Documentation content changes
- [ ] Other (please describe)

## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->

## What is the new behavior?
<!-- Please describe the new behavior after your change. -->
## Current vs new behavior
<!-- Please describe the current behavior that you are modifying and the new behavior. -->

## Does this PR introduce a breaking change?
- [ ] Yes
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@ test-unit:
test-int:
python -m pytest test/integration

test-examples:
python -m pytest examples

lint:
./pylint.sh
16 changes: 9 additions & 7 deletions examples/test_case_management_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,22 @@
#
# This file provides an example of how to use the Case Management service.
#
# The following configuration properties are assumed to be defined:
#
# CASE_MANAGEMENT_URL=<service url>
# CASE_MANAGEMENT_AUTHTYPE=iam
# CASE_MANAGEMENT_APIKEY=<IAM apikey>
# CASE_MANAGEMENT_AUTH_TYPE=iam
# CASE_MANAGEMENT_AUTH_URL=<IAM token service URL - omit this if using the production environment>
# CASE_MANAGEMENT_RESOURCE_CRN=<cloud resource name>
# CASE_MANAGEMENT_APIKEY=<IAM apikey>
# CASE_MANAGEMENT_RESOURCE_CRN=<CRN of resource to use in examples>
#
# These configuration properties can be exported as environment variables, or stored
# in a configuration file and then:
# export IBM_CREDENTIALS_FILE=<name of configuration file>
#

# Config file name
config_file = 'case_management.env'

case_management_service = None

config = None

case_number = None
attachment_id = None
resource_crn = None
Expand Down
19 changes: 18 additions & 1 deletion examples/test_configuration_governance_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,24 @@
from ibm_cloud_sdk_core import ApiException, read_external_sources
from ibm_platform_services.configuration_governance_v1 import *

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

configuration_governance_service = None
Expand Down
8 changes: 6 additions & 2 deletions examples/test_enterprise_billing_units_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,19 @@
#
# This file provides an example of how to use the Enterprise Billing Units service.
#
# The following configuration properties are assumed to be defined in the external configuration file:
# The following configuration properties are assumed to be defined:
#
# ENTERPRISE_BILLING_UNITS_URL=<service url>
# ENTERPRISE_BILLING_UNITS_AUTHTYPE=iam
# ENTERPRISE_BILLING_UNITS_APIKEY=<your iam apikey>
# ENTERPRISE_BILLING_UNITS_AUTH_URL=<IAM token service URL - omit this if using the production environment>
# ENTERPRISE_BILLING_UNITS_ENTERPRISE_ID=<id of enterprise to use for examples>
# ENTERPRISE_BILLING_UNITS_BILLING_UNIT_ID=<id of billing unit to use for examples>
#
# Config file name
# These configuration properties can be exported as environment variables, or stored
# in a configuration file and then:
# export IBM_CREDENTIALS_FILE=<name of configuration file>
#
config_file = 'enterprise_billing_units.env'

enterprise_billing_units_service = None
Expand Down
8 changes: 3 additions & 5 deletions examples/test_enterprise_usage_reports_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from ibm_platform_services.enterprise_usage_reports_v1 import *

#
# This file provides an example of how to use the Usage Reports service.
# This file provides an example of how to use the Enterprise Usage Reports service.
#
# The following configuration properties are assumed to be defined:
# ENTERPRISE_USAGE_REPORTS_URL=<service url>
Expand All @@ -36,11 +36,9 @@
# ENTERPRISE_USAGE_REPORTS_BILLING_MONTH=<the billing month (yyyy-mm) for which usage info will be retrieved>
#
# These configuration properties can be exported as environment variables, or stored
# in a "credentials" file and then:
# export IBM_CREDENTIALS_FILE=<name of credentials file>
# in a configuration file and then:
# export IBM_CREDENTIALS_FILE=<name of configuration file>
#

# Config file name
config_file = 'enterprise_usage_reports.env'

enterprise_usage_reports_service = None
Expand Down
8 changes: 6 additions & 2 deletions examples/test_global_catalog_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,17 @@
#
# This file provides an example of how to use the Global Catalog service.
#
# The following configuration properties are assumed to be defined:
#
# GLOBAL_CATALOG_URL=<service url>
# GLOBAL_CATALOG_AUTH_TYPE=iam
# GLOBAL_CATALOG_APIKEY=<IAM apikey>
# GLOBAL_CATALOG_AUTH_URL=<IAM token service URL - omit this if using the production environment>
#

# Config file name
# These configuration properties can be exported as environment variables, or stored
# in a configuration file and then:
# export IBM_CREDENTIALS_FILE=<name of configuration file>
#
config_file = 'global_catalog.env'

global_catalog_service = None
Expand Down
21 changes: 13 additions & 8 deletions examples/test_global_search_v2_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,21 @@
from ibm_cloud_sdk_core import ApiException, read_external_sources
from ibm_platform_services.global_search_v2 import *

# This file provides an example of how to use the Global Tagging service.
#
# This file provides an example of how to use the Global Search service.
#
# The following configuration properties are assumed to be defined:
#
# The following configuration properties are assumed to be defined in the external configuration file:
# GLOBAL_TAGGING_URL=<service url>
# GLOBAL_TAGGING_AUTHTYPE=iam
# GLOBAL_TAGGING_APIKEY=<IAM api key>
# GLOBAL_TAGGING_AUTH_URL=<IAM token service URL - omit this if using the production environment>
# GLOBAL_TAGGING_RESOURCE_CRN=<the crn of the resource to be used in the examples>

# Config file name
# GLOBAL_SEARCH_URL=<service url>
# GLOBAL_SEARCH_AUTHTYPE=iam
# GLOBAL_SEARCH_APIKEY=<IAM api key>
# GLOBAL_SEARCH_AUTH_URL=<IAM token service URL - omit this if using the production environment>
#
# These configuration properties can be exported as environment variables, or stored
# in a configuration file and then:
# export IBM_CREDENTIALS_FILE=<name of configuration file>
#
config_file = 'global_search.env'

global_search_service = None
Expand Down
11 changes: 8 additions & 3 deletions examples/test_global_tagging_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,21 @@
from ibm_cloud_sdk_core import ApiException, read_external_sources
from ibm_platform_services.global_tagging_v1 import *

#
# This file provides an example of how to use the Global Tagging service.
#
# The following configuration properties are assumed to be defined in the external configuration file:
# The following configuration properties are assumed to be defined:
#
# GLOBAL_TAGGING_URL=<service url>
# GLOBAL_TAGGING_AUTHTYPE=iam
# GLOBAL_TAGGING_APIKEY=<IAM api key>
# GLOBAL_TAGGING_AUTH_URL=<IAM token service URL - omit this if using the production environment>
# GLOBAL_TAGGING_RESOURCE_CRN=<the crn of the resource to be used in the examples>

# Config file name
#
# These configuration properties can be exported as environment variables, or stored
# in a configuration file and then:
# export IBM_CREDENTIALS_FILE=<name of configuration file>
#
config_file = 'global_tagging.env'

global_tagging_service = None
Expand Down
9 changes: 6 additions & 3 deletions examples/test_iam_access_groups_v2_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,18 @@
#
# This file provides an example of how to use the IAM Access Groups service.
#
# The following configuration properties are assumed to be defined in the external configuration file:
# The following configuration properties are assumed to be defined:
#
# IAM_ACCESS_GROUPS_URL=<service url>
# IAM_ACCESS_GROUPS_AUTHTYPE=iam
# IAM_ACCESS_GROUPS_APIKEY=<your iam apikey>
# IAM_ACCESS_GROUPS_AUTH_URL=<IAM token service URL - omit this if using the production environment>
# IAM_ACCESS_GROUPS_TEST_ACCOUNT_ID=<id of an account used for testing>
#

# Config file name
# These configuration properties can be exported as environment variables, or stored
# in a configuration file and then:
# export IBM_CREDENTIALS_FILE=<name of configuration file>
#
config_file = 'iam_access_groups.env'

iam_access_groups_service = None
Expand Down
8 changes: 3 additions & 5 deletions examples/test_iam_identity_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from ibm_platform_services.iam_identity_v1 import *

#
# This file provides an example of how to use the IAM-IDENTITY service.
# This file provides an example of how to use the IAM Identity service.
#
# The following configuration properties are assumed to be defined:
#
Expand All @@ -36,11 +36,9 @@
# IAM_IDENTITY_IAM_ID=<IAM ID which is unique to the User account>
#
# These configuration properties can be exported as environment variables, or stored
# in a "credentials" file and then:
# export IBM_CREDENTIALS_FILE=<name of credentials file>
# in a configuration file and then:
# export IBM_CREDENTIALS_FILE=<name of configuration file>
#

# Config file name
config_file = 'iam_identity.env'

iam_identity_service = None
Expand Down
8 changes: 3 additions & 5 deletions examples/test_open_service_broker_v1_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@
from ibm_cloud_sdk_core import ApiException, read_external_sources
from ibm_platform_services.open_service_broker_v1 import *

# Config file name
config_file = 'open_service_broker.env'

#
# This file provides an example of how to use the Open Service Broker service.
#
Expand All @@ -44,9 +41,10 @@
# OPEN_SERVICE_BROKER_ORGANIZATION_GUID=<The IBM Cloud platform GUID for the organization under which the service instance is to be provisioned>
#
# These configuration properties can be exported as environment variables, or stored
# in a "credentials" file and then:
# export IBM_CREDENTIALS_FILE=<name of credentials file>
# in a configuration file and then:
# export IBM_CREDENTIALS_FILE=<name of configuration file>
#
config_file = 'open_service_broker.env'

open_service_broker_service = None

Expand Down
8 changes: 3 additions & 5 deletions examples/test_resource_controller_v2_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
from ibm_cloud_sdk_core import ApiException, read_external_sources
from ibm_platform_services.resource_controller_v2 import *

# Config file name
config_file = 'resource_controller.env'

#
# This file provides an example of how to use the Resource Controller service.
#
Expand All @@ -42,9 +39,10 @@
# RESOURCE_CONTROLLER_BINDING_TARGET_CRN=<The CRN of application to bind to in a specific environment>
#
# These configuration properties can be exported as environment variables, or stored
# in a "credentials" file and then:
# export IBM_CREDENTIALS_FILE=<name of credentials file>
# in a configuration file and then:
# export IBM_CREDENTIALS_FILE=<name of configuration file>
#
config_file = 'resource_controller.env'

resource_controller_service = None

Expand Down
9 changes: 6 additions & 3 deletions examples/test_usage_metering_v4_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@
#
# This file provides an example of how to use the Usage Metering service.
#
# The following configuration properties are assumed to be defined in the external configuration file:
# The following configuration properties are assumed to be defined:
#
# USAGE_METERING_URL=<service url>
# USAGE_METERING_AUTHTYPE=iam
# USAGE_METERING_APIKEY=<your iam apikey>
# USAGE_METERING_AUTH_URL=<IAM token service URL - omit this if using the production environment>
#

# Config file name
# These configuration properties can be exported as environment variables, or stored
# in a configuration file and then:
# export IBM_CREDENTIALS_FILE=<name of configuration file>
#
config_file = 'usage_metering.env'

usage_metering_service = None
Expand Down
6 changes: 2 additions & 4 deletions examples/test_usage_reports_v4_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@
# USAGE_REPORTS_BILLING_MONTH=<the billing month (yyyy-mm) for which usage info will be retrieved>
#
# These configuration properties can be exported as environment variables, or stored
# in a "credentials" file and then:
# export IBM_CREDENTIALS_FILE=<name of credentials file>
# in a configuration file and then:
# export IBM_CREDENTIALS_FILE=<name of configuration file>
#

# Config file name
config_file = 'usage_reports.env'

usage_reports_service = None
Expand Down