Skip to content
This repository was archived by the owner on May 14, 2021. It is now read-only.
This repository was archived by the owner on May 14, 2021. It is now read-only.

SaveSiteConfiguration doesn't preserve all schedule details #54

Description

@danbourke

Expected Behavior

getting a SiteConfig object with GetSiteConfiguration(site), and then saving it with SaveSiteConfiguration(site) shouldn't change anything about the site's configuration.

Current Behavior

If you get a SiteConfig object with GetSiteConfiguration, then save it with SaveSiteConfiguration, without making any changes to the object, scan schedules will lose their:

  • names
  • templates
  • targets

Possible Solution

I'm not sure what populates the 'schedules' object on a SiteConfiguration object, but update it so it also fetches names + templates (and make sure SaveSiteConfiguration respects those)

Steps to Reproduce (for bugs)

  1. Create a scan schedule in a site, with a name and a non-default template.
  2. run the code below
  3. look at the scan schedule for your site, see name=n/a, template=default, targets=n/a

Python code that reproduces the issue:

site = client.GetSiteConfiguration(site_summary_object)
client.SaveSiteConfiguration(site)

Context

We're trying to automate some scheduling but we kept finding out schedule details wiped (we were using names to update schedules when required, and can't)

Your Environment

  • Nexpose-client-python version: 0.1.7
  • Python version: 3.6.5
  • Operating System and version: various
  • Nexpose product version: 6.5.21

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions