Skip to content

Commit 59b7ba8

Browse files
Update app.py
1 parent 7643fb3 commit 59b7ba8

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

jobs/account-port-scan/app.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,23 @@
2323
from ibm_cloud_sdk_core import ApiException
2424
from ibm_cloud_sdk_core.authenticators import IAMAuthenticator
2525

26-
# Retrieve the IBM Cloud API key from the environment
26+
"""
27+
Pull IBM Cloud API key from environment. If not set, raise an error.
28+
"""
2729
ibmcloud_api_key = os.environ.get('IBMCLOUD_API_KEY')
2830
if not ibmcloud_api_key:
2931
raise ValueError("IBMCLOUD_API_KEY environment variable not found")
3032

31-
# Create an IAM authenticator object
33+
"""
34+
Create an IAM authenticator object for use with the VPC API.
35+
"""
3236
authenticator = IAMAuthenticator(apikey=ibmcloud_api_key)
3337

3438
def sl_iam_client():
3539
"""
3640
Create a SoftLayer client object using the IBM Cloud API key
3741
This function is used to authenticate to the SoftLayer API
42+
and interact with Classic resources.
3843
"""
3944
client = SoftLayer.create_client_from_env(
4045
username="apikey",

0 commit comments

Comments
 (0)