Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

[2.0] Check the existence and status of an scan_id #179

Merged
merged 2 commits into from
Nov 8, 2019

Conversation

jjnicola
Copy link
Member

@jjnicola jjnicola commented Nov 8, 2019

No description provided.

@codecov
Copy link

codecov bot commented Nov 8, 2019

Codecov Report

Merging #179 into ospd-2.0 will decrease coverage by 0.06%.
The diff coverage is 64.28%.

Impacted file tree graph

@@             Coverage Diff              @@
##           ospd-2.0     #179      +/-   ##
============================================
- Coverage     68.53%   68.46%   -0.07%     
============================================
  Files            12       12              
  Lines          1802     1814      +12     
============================================
+ Hits           1235     1242       +7     
- Misses          567      572       +5
Impacted Files Coverage Δ
ospd/ospd.py 72.33% <64.28%> (-0.21%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fdbf434...30a3398. Read the comment docs.

Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

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

Just a docstring update should be added :-)

ospd/ospd.py Outdated
@@ -1707,9 +1713,20 @@ def create_scan(self, scan_id, targets, options, vts):

@return: New scan's ID.
Copy link
Contributor

Choose a reason for hiding this comment

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

The docstring should be updated for the already running case. It is returning None implicitly.

It checked only for STOPPED before resuming a scan.
It checks now also for FINISHED and RUNNING status and avoid
to restartin a scan which is already running or finished.
@bjoernricks bjoernricks merged commit 4981808 into greenbone:ospd-2.0 Nov 8, 2019
@jjnicola jjnicola deleted the check-status-2 branch November 15, 2019 11:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants