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

The return code on the end maintenance API call does not correspond with the info provided in the documentation #6

Closed
ajoaoff opened this issue Jun 8, 2021 · 1 comment · Fixed by #24
Assignees
Labels
2022.1 Kytos-ng 2022.1

Comments

@ajoaoff
Copy link

ajoaoff commented Jun 8, 2021

Original issue opened by @ArturoQuintana at kytos#35.

@hdiogenes @ajoaoff @rmotitsuki

It has been tested the API call /maintenance/{mw_id}/end on PATCH with the idea to execute an early end over a maintenance task that is running. Unfortunately, this task does not succeed.
The test code used is as follow:

def test_040_end_mw_on_switch(self):
        # Setup maintenance window data
        start = datetime.now() + timedelta(seconds=60)
        end = start + timedelta(hours=1)
        payload = {
            "description": "mw for test 040",
            "start": start.strftime(TIME_FMT),
            "end": end.strftime(TIME_FMT),
            "items": [
                "00:00:00:00:00:00:00:02"
            ]
        }

        # Request maintenance schema creation, and extract the mw_id
        json_data = self.request_maintenance(payload, False)
        mw_id = json_data["mw_id"]

        time.sleep(10)

        api_url = KYTOS_API + '/maintenance/' + mw_id + '/end'
        request = requests.patch(api_url)
        assert request.status_code == 201`
```
@ajoaoff
Copy link
Author

ajoaoff commented Jul 27, 2021

Closed by #24

@ajoaoff ajoaoff closed this as completed Jul 27, 2021
@viniarck viniarck added the 2022.1 Kytos-ng 2022.1 label Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2022.1 Kytos-ng 2022.1
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants