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

Add remove_assets_from_site method #258

Merged
merged 3 commits into from
Jan 31, 2017
Merged

Conversation

gschneider-r7
Copy link
Contributor

Description

Adds a new method to the Connection class to remove site association from a collection of assets. Note that this can result in assets being deleted if they either only belong to 1 site or if asset linking is disabled.

Usage:

nsc = Nexpose::Connection.new('localhost', 'myuser', 'mypassword')
# login, list sites and assets, etc.

assets = [25, 72] # array of asset ID(s) is required
site_id = 3
nsc.remove_assets_from_site(assets, site_id)

Motivation and Context

Resolves #228

How Has This Been Tested?

Tested on a console with asset linking enabled where a collection of assets are associated to 2 sites.

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have updated the documentation accordingly (if changes are required).
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Use the UI endpoint for removing the site association from a collection
of assets. Note that this can result in assets being deleted if they
either only belong to 1 site or if asset linking is disabled.

Resolves #228
@gschneider-r7
Copy link
Contributor Author

I think the Travis-CI failures are due to this ku1ik/rainbow#44

Will look at it some more later.

@gschneider-r7
Copy link
Contributor Author

Still something up with the travis builds on 2.1.5, so I'll have to look at fixing up the dependencies. The other builds are currently passing so it's not necessarily a blocker to merging this PR.

@sgreen-r7 sgreen-r7 merged commit e837ed0 into master Jan 31, 2017
@gschneider-r7 gschneider-r7 deleted the remove_assets_from_site branch January 31, 2017 01:07
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.

Add "Remove asset from site" method for global assets (asset linking enabled)
2 participants