-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Description
Updating the url based on customer residency does not work for test use cases. For example,
$ cat ~/.alertlogic/config
[aetuner_int]
access_key_id=skip
secret_key=skip
global_endpoint=localhost3001
$ cat api/aetuner.v1.yaml
...
servers:
- url: 'https://aetuner.mdr.global.alertlogic.com'
x-alertlogic-global-endpoint: production
description: production
- url: 'https://aetuner.mdr.product.dev.alertlogic.com'
x-alertlogic-global-endpoint: integration
description: integration
- url: 'http://localhost:3000'
x-alertlogic-global-endpoint: localhost3000
description: localhost on port 3000
...
$ _venv/bin/alcli --profile aetuner_int aetuner get_analytic --account_id $account_id --path ngx/SuspConfCng/AwsPacu --enable_new=1
Traceback (most recent call last):
File "/Users/rkarol-admin/github/alertlogic/aetuner/_venv/lib/python3.7/site-packages/alcli/alertlogic_cli.py", line 116, in main
return services[parsed_args.service](remaining, parsed_args)
File "/Users/rkarol-admin/github/alertlogic/aetuner/_venv/lib/python3.7/site-packages/alcli/alertlogic_cli.py", line 199, in __call__
res = operation(**op_args)
File "/Users/rkarol-admin/github/alertlogic/aetuner/_venv/lib/python3.7/site-packages/almdrlib/client.py", line 619, in __call__
return self._call(*args, **kwargs)
File "/Users/rkarol-admin/github/alertlogic/aetuner/_venv/lib/python3.7/site-packages/almdrlib/client.py", line 586, in f
self._server.update_url(account_id)
File "/Users/rkarol-admin/github/alertlogic/aetuner/_venv/lib/python3.7/site-packages/almdrlib/client.py", line 52, in update_url
self._url = self._session.get_url(self._service_name, account_id)
File "/Users/rkarol-admin/github/alertlogic/aetuner/_venv/lib/python3.7/site-packages/almdrlib/session.py", line 260, in get_url
self.residency),
File "/Users/rkarol-admin/github/alertlogic/aetuner/_venv/lib/python3.7/site-packages/almdrlib/session.py", line 304, in request
**kwargs)
File "/Users/rkarol-admin/github/alertlogic/aetuner/_venv/lib/python3.7/site-packages/requests/sessions.py", line 528, in request
prep = self.prepare_request(req)
File "/Users/rkarol-admin/github/alertlogic/aetuner/_venv/lib/python3.7/site-packages/requests/sessions.py", line 466, in prepare_request
hooks=merge_hooks(request.hooks, self.hooks),
File "/Users/rkarol-admin/github/alertlogic/aetuner/_venv/lib/python3.7/site-packages/requests/models.py", line 316, in prepare
self.prepare_url(url, params)
File "/Users/rkarol-admin/github/alertlogic/aetuner/_venv/lib/python3.7/site-packages/requests/models.py", line 390, in prepare_url
raise MissingSchema(error)
requests.exceptions.MissingSchema: Invalid URL 'localhost3001/endpoints/v1/134255110/residency/default/services/aetuner/endpoint': No schema supplied. Perhaps you meant http://localhost3001/endpoints/v1/134255110/residency/default/services/aetuner/endpoint?In these cases update_url here should not update the URL based on the customer residency.
alertlogic-sdk-python/almdrlib/client.py
Line 585 in a8a08ed
| if account_id: |
Metadata
Metadata
Assignees
Labels
No labels