Skip to content

Commit 1909519

Browse files
committed
Mark all modules of openvasd API as private
Users should not import anything from these modules.
1 parent 5940bd8 commit 1909519

File tree

13 files changed

+13
-16
lines changed

13 files changed

+13
-16
lines changed

gvm/protocols/http/openvasd/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
from gvm.protocols.http.openvasd import OpenvasdHttpApiV1
1313
"""
1414

15-
from .openvasd1 import OpenvasdHttpAPIv1
15+
from ._openvasd1 import OpenvasdHttpAPIv1
1616

1717
__all__ = ["OpenvasdHttpAPIv1"]

gvm/protocols/http/openvasd/openvasd1.py renamed to gvm/protocols/http/openvasd/_openvasd1.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
from typing import Optional, Tuple, Union
1313

1414
from ._client import StrOrPathLike, create_openvasd_http_client
15-
from .health import HealthAPI
16-
from .metadata import MetadataAPI
17-
from .notus import NotusAPI
18-
from .scans import ScansAPI
19-
from .vts import VtsAPI
15+
from ._health import HealthAPI
16+
from ._metadata import MetadataAPI
17+
from ._notus import NotusAPI
18+
from ._scans import ScansAPI
19+
from ._vts import VtsAPI
2020

2121

2222
class OpenvasdHttpAPIv1:

tests/protocols/http/openvasd/test_health.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import httpx
99

10-
from gvm.protocols.http.openvasd.health import HealthAPI
10+
from gvm.protocols.http.openvasd._health import HealthAPI
1111

1212

1313
def _mock_response(status_code=200):
@@ -18,7 +18,6 @@ def _mock_response(status_code=200):
1818

1919

2020
class TestHealthAPI(unittest.TestCase):
21-
2221
def setUp(self):
2322
self.mock_client = MagicMock(spec=httpx.Client)
2423
self.health_api = HealthAPI(self.mock_client)

tests/protocols/http/openvasd/test_metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import httpx
99

10-
from gvm.protocols.http.openvasd.metadata import MetadataAPI
10+
from gvm.protocols.http.openvasd._metadata import MetadataAPI
1111

1212

1313
def _mock_head_response(status_code=200, headers=None):

tests/protocols/http/openvasd/test_notus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
import httpx
99

10-
from gvm.protocols.http.openvasd.notus import NotusAPI
10+
from gvm.protocols.http.openvasd._notus import NotusAPI
1111

1212

1313
def _mock_response(status_code=200, json_data=None):

0 commit comments

Comments
 (0)