rapid7 / nexpose-client-python

DEPRECATED : Rapid7 Nexpose API client library written in Python
https://www.rapid7.com/
BSD 3-Clause "New" or "Revised" License
25 stars 20 forks source link

Adding site schedule to Init, AsXML, and CreateFromXML #19

Closed scottjpack closed 7 years ago

scottjpack commented 7 years ago

Description

Schedules were not being parsed from API responses into the SiteConfiguration. This caused calls to SaveSite to remove any existing schedules. This commit stores the schedule elements into the SiteConfiguration, and dumps them back in when AsXML is called.

Note: The Schedule XML elements remain as XML elements, they are not parsed into a dictionary attribute or anything. This commit won't help much on creating or modifying schedules via the lib, but it makes it so that SaveSiteConfiguration doesn't destroy existing schedules.

Motivation and Context

I want to be able to update assets within the site without removing scan schedules.

How Has This Been Tested?

Created a scan schedule, used the library to modify the asset list, ensured that the previous schedules were not removed.

Types of changes

Bug Fix

gschneider-r7 commented 7 years ago

Closing this in favor of #20 as discussed in #17