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

Added support for TenableAD profile APIs #484

Merged
merged 1 commit into from
Dec 8, 2021

Conversation

tushar-balwani
Copy link
Contributor

Description

Added Tenable.AD profile APIs

  • Retrieve all profile instances. (list)
  • Create profile instance. (create)
  • Get profile instance by id. (details)
  • Update profile instance. (update)
  • Delete profile instance. (delete)
  • Creates a new profile from another one (copy_profile)
  • Commits change of the related profile (commit)
  • Unstages change of the related profile (unstage)

updated docs to support profile api details

Fixes # (issue)

Type of change

Please delete options that are not relevant.

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

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Added tests for all profile endpoints to test responses
  • Added schema tests for testing payload inputs and response dict validation

Test Configuration:

  • Python Version(s) Tested: 3.8.6
  • Tenable.sc version (if necessary):

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@tushar-balwani tushar-balwani marked this pull request as ready for review December 3, 2021 18:19
@tushar-balwani tushar-balwani requested a review from a team December 3, 2021 18:19
... directories=[1, 2]
... )
'''
payload = [self._schema.dump({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should load the schema before dumping to perform validation.

Copy link
Contributor Author

@tushar-balwani tushar-balwani Dec 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated request payload with schema.load before dumping.

... name='EDITED'
... )
'''
payload = self._schema.dump(kwargs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should load the schema before dumping to perform validation.

Copy link
Contributor Author

@tushar-balwani tushar-balwani Dec 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated request payload with schema.load before dumping.

... directories=[1, 2]
... )
'''
payload = self._schema.dump({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should load the schema before dumping to perform validation.

Copy link
Contributor Author

@tushar-balwani tushar-balwani Dec 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated request payload with schema.load before dumping.

Addressed review comments
@SteveMcGrath SteveMcGrath merged commit 7cbd27f into master Dec 8, 2021
@SteveMcGrath SteveMcGrath deleted the feature/tenable.ad.profile branch December 8, 2021 16:05
@SteveMcGrath SteveMcGrath added this to the 1.5 milestone Dec 10, 2021
@SteveMcGrath SteveMcGrath added enhancement New features/functionality unit-testing This issue requires new/updated tests documentation Documentation issues Tenable.ad Tenable.ad Package labels Dec 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation issues enhancement New features/functionality Tenable.ad Tenable.ad Package unit-testing This issue requires new/updated tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants