Skip to content
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

Assign default HTTPClient URL #106

Closed
sserrata opened this issue Sep 18, 2018 · 0 comments
Closed

Assign default HTTPClient URL #106

sserrata opened this issue Sep 18, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@sserrata
Copy link
Member

  • Palo Alto Networks Cloud Python SDK version: v1.3.0
  • Python version: 2.7, 3.5+
  • Operating System: any

Description

With the GA release of the Application Framework APIs it is now possible to assign a default to the HTTPClient() url instance variable. Currently, the Application Framework supports URLs for two regions (US and Europe):

Given the options, a sane default would be https://api.us.paloaltonetworks.com.

Proposal

In HTTPClient class, update self.url to the following:

self.url = kwargs.pop('url', 'https://api.us.paloaltonetworks.com')

https://github.com/PaloAltoNetworks/pancloud/blob/master/pancloud/httpclient.py#L92

The behavior of the LoggingService, EventService and DirectorySyncService classes should be to accept the url value passed directly to the class constructor, the url value assigned to a passed-in HTTPClient/session object or the default url value.

@sserrata sserrata added the enhancement New feature or request label Sep 18, 2018
@sserrata sserrata self-assigned this Sep 18, 2018
@sserrata sserrata closed this as completed Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant