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

Allow for Starting Scan during Blackout #297

Merged
merged 1 commit into from
Sep 12, 2017

Conversation

sgreen-r7
Copy link
Contributor

@sgreen-r7 sgreen-r7 commented Sep 12, 2017

Adding the ability for Starting a Scan during Blackout

  • Two methods to start a scan during blackout
    • Nexpose::Site.scan ~> site.scan(id, sync_id, blackout_override)
    • Nexpose::Connection.scan_site ~> nsc.scan_site(id, blackout_override)
  • Set the blackout_override argument to true to override the blackout.
    • Even if set to true Nexpose will still do a check on the backend to verify the user has the appropriate level of permissions to bypass the blackout.

xml = REXML::Element.new('SiteScanRequest')
xml.add_attributes({ 'session-id' => connection.session_id,
'site-id' => @id,
'sync-id' => sync_id })

xml.add_attributes({ 'force' => true }) if blackout_override

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.

xml = make_xml('SiteScanRequest', 'site-id' => site_id)
def scan_site(site_id, blackout_override = false)
xml = make_xml('SiteScanRequest', 'site-id' => site_id)
xml.add_attributes({ 'force' => true }) if blackout_override

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.

xml = REXML::Element.new('SiteScanRequest')
xml.add_attributes({ 'session-id' => connection.session_id,
'site-id' => @id,
'sync-id' => sync_id })

xml.add_attributes({ 'force' => true }) if blackout_override

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.

xml = make_xml('SiteScanRequest', 'site-id' => site_id)
def scan_site(site_id, blackout_override = false)
xml = make_xml('SiteScanRequest', 'site-id' => site_id)
xml.add_attributes({ 'force' => true }) if blackout_override

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.

@sgreen-r7 sgreen-r7 merged commit 100a74b into master Sep 12, 2017
@gperez-r7 gperez-r7 deleted the bypass_blackout_start_scan branch May 14, 2019 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants