Skip to content

Commit

Permalink
fix: updated README and logger prints
Browse files Browse the repository at this point in the history
  • Loading branch information
payaljindal committed Mar 4, 2024
1 parent f399e70 commit 6746a8c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions tools/target-server-validator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,15 @@ bucket_project_id=xx-xxx-xx # GCS bucket project id
file_path_in_bucket=scan_output.txt # path to output file
```

To get the notification channel id, use the following command

```
gcloud beta monitoring channels list --project=<project_id>
```

This command will display all available notification channels within your project. You can select the appropriate one based on your requirements. Locate the notification channel ID under the `name` field in the format `projects/<project_id>/notificationChannels/<notification_channel_id>`, and insert it into the input.properties file.


* Sample input CSV with target servers
> **NOTE:** You need to set `check_csv=true` in the `validation` section of `input.properties`
Expand Down
2 changes: 1 addition & 1 deletion tools/target-server-validator/apigee_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def deploy_api_bundle(self, env, api_name, proxy_bundle_path, api_force_redeploy
if self.get_api_revisions_deployment(
env, api_name, api_rev
):
logger.debug(f"Proxy {api_name} active in runtime after {api_deployment_retry_count*api_deployment_sleep} seconds ") # noqa
logger.info(f"Proxy {api_name} active in runtime after {api_deployment_retry_count*api_deployment_sleep} seconds ") # noqa
return True
else:
logger.debug(f"Checking API deployment status in {api_deployment_sleep} seconds") # noqa
Expand Down
4 changes: 2 additions & 2 deletions tools/target-server-validator/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def main():
for each_api_type, each_api_type_data in api_revision_map.items() # noqa
for each_api, each_api_rev in each_api_type_data["proxies"].items() # noqa
)
logger.debug("Exporting proxy target servers")
logger.info("Exporting proxy target servers")
results = run_parallel(source_apigee.fetch_api_proxy_ts_parallel, parallel_args) # noqa

for result in results:
Expand All @@ -192,7 +192,7 @@ def main():
proxy_targets[each_te] = [
f"{each_api_type} - {each_api}"
]
logger.debug("Exporting proxy target servers done")
logger.info("Exporting proxy target servers done")

# Fetch API Northbound Endpoint
logger.info(f"Fetching VHost with name {cfg['validation']['api_hostname']} !") # noqa
Expand Down

0 comments on commit 6746a8c

Please sign in to comment.