-
Notifications
You must be signed in to change notification settings - Fork 103
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
Some methods were not honoring custom Connection Timeouts #300
Conversation
@@ -179,7 +179,7 @@ def save(nsc) | |||
end | |||
xml.add_element(as_xml) | |||
|
|||
response = APIRequest.execute(nsc.url, xml, '1.2') | |||
response = APIRequest.execute(nsc.url, xml, '1.2', { timeout: nsc.timeout, open_timeout: nsc.open_timeout }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant curly braces around a hash parameter.
@@ -157,7 +157,7 @@ def initialize(name, full_name, id = -1, enabled = true, scope = Scope::SILO) | |||
def self.load(nsc, name, scope = Scope::SILO) | |||
xml = nsc.make_xml('RoleDetailsRequest') | |||
xml.add_element('Role', { 'name' => name, 'scope' => scope }) | |||
response = APIRequest.execute(nsc.url, xml, '1.2') | |||
response = APIRequest.execute(nsc.url, xml, '1.2', { timeout: nsc.timeout, open_timeout: nsc.open_timeout }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant curly braces around a hash parameter.
@@ -159,7 +159,7 @@ def rescan_assets(connection) | |||
# | |||
def self.load(connection, id) | |||
xml = %(<AssetGroupConfigRequest session-id="#{connection.session_id}" group-id="#{id}"/>) | |||
r = APIRequest.execute(connection.url, xml) | |||
r = APIRequest.execute(connection.url, xml, '1.1', { timeout: connection.timeout, open_timeout: connection.open_timeout }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redundant curly braces around a hash parameter.
There were four methods that had non-standard direct calls to
APIRequest.execute
causing the custom set timeouts to be ignored.The following methods have been updated to use the
Connection::timeout
:AssetGroup.load
Role.load
Role::save
Site::scan