nbforager 0.1.14__tar.gz → 0.1.15__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. {nbforager-0.1.14 → nbforager-0.1.15}/PKG-INFO +2 -2
  2. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/branch/nb_custom.py +8 -2
  3. {nbforager-0.1.14 → nbforager-0.1.15}/pyproject.toml +2 -2
  4. nbforager-0.1.14/nbforager/api/__pycache__/__init__.cpython-38.pyc +0 -0
  5. nbforager-0.1.14/nbforager/api/__pycache__/base_c.cpython-38.pyc +0 -0
  6. nbforager-0.1.14/nbforager/api/__pycache__/base_ca.cpython-38.pyc +0 -0
  7. nbforager-0.1.14/nbforager/api/__pycache__/circuits.cpython-38.pyc +0 -0
  8. nbforager-0.1.14/nbforager/api/__pycache__/connector.cpython-38.pyc +0 -0
  9. nbforager-0.1.14/nbforager/api/__pycache__/core.cpython-38.pyc +0 -0
  10. nbforager-0.1.14/nbforager/api/__pycache__/dcim.cpython-38.pyc +0 -0
  11. nbforager-0.1.14/nbforager/api/__pycache__/extended_get.cpython-38.pyc +0 -0
  12. nbforager-0.1.14/nbforager/api/__pycache__/extras.cpython-38.pyc +0 -0
  13. nbforager-0.1.14/nbforager/api/__pycache__/ip_addresses.cpython-38.pyc +0 -0
  14. nbforager-0.1.14/nbforager/api/__pycache__/ipam.cpython-38.pyc +0 -0
  15. nbforager-0.1.14/nbforager/api/__pycache__/plugins_ca.cpython-38.pyc +0 -0
  16. nbforager-0.1.14/nbforager/api/__pycache__/status.cpython-38.pyc +0 -0
  17. nbforager-0.1.14/nbforager/api/__pycache__/tenancy.cpython-38.pyc +0 -0
  18. nbforager-0.1.14/nbforager/api/__pycache__/users.cpython-38.pyc +0 -0
  19. nbforager-0.1.14/nbforager/api/__pycache__/virtualization.cpython-38.pyc +0 -0
  20. nbforager-0.1.14/nbforager/api/__pycache__/wireless.cpython-38.pyc +0 -0
  21. nbforager-0.1.14/nbforager/branch/__pycache__/__init__.cpython-38.pyc +0 -0
  22. nbforager-0.1.14/nbforager/branch/__pycache__/nb_branch.cpython-38.pyc +0 -0
  23. nbforager-0.1.14/nbforager/branch/__pycache__/nb_custom.cpython-38.pyc +0 -0
  24. nbforager-0.1.14/nbforager/branch/__pycache__/nb_value.cpython-38.pyc +0 -0
  25. nbforager-0.1.14/nbforager/foragers/__pycache__/__init__.cpython-38.pyc +0 -0
  26. nbforager-0.1.14/nbforager/foragers/__pycache__/base_fa.cpython-38.pyc +0 -0
  27. nbforager-0.1.14/nbforager/foragers/__pycache__/circuits.cpython-38.pyc +0 -0
  28. nbforager-0.1.14/nbforager/foragers/__pycache__/core.cpython-38.pyc +0 -0
  29. nbforager-0.1.14/nbforager/foragers/__pycache__/dcim.cpython-38.pyc +0 -0
  30. nbforager-0.1.14/nbforager/foragers/__pycache__/extras.cpython-38.pyc +0 -0
  31. nbforager-0.1.14/nbforager/foragers/__pycache__/forager.cpython-38.pyc +0 -0
  32. nbforager-0.1.14/nbforager/foragers/__pycache__/ipam.cpython-38.pyc +0 -0
  33. nbforager-0.1.14/nbforager/foragers/__pycache__/ipv4.cpython-38.pyc +0 -0
  34. nbforager-0.1.14/nbforager/foragers/__pycache__/joiner.cpython-38.pyc +0 -0
  35. nbforager-0.1.14/nbforager/foragers/__pycache__/tenancy.cpython-38.pyc +0 -0
  36. nbforager-0.1.14/nbforager/foragers/__pycache__/users.cpython-38.pyc +0 -0
  37. nbforager-0.1.14/nbforager/foragers/__pycache__/virtualization.cpython-38.pyc +0 -0
  38. nbforager-0.1.14/nbforager/foragers/__pycache__/wireless.cpython-38.pyc +0 -0
  39. {nbforager-0.1.14 → nbforager-0.1.15}/README.rst +0 -0
  40. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/__init__.py +0 -0
  41. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/__init__.py +0 -0
  42. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/base_c.py +0 -0
  43. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/base_ca.py +0 -0
  44. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/circuits.py +0 -0
  45. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/connector.py +0 -0
  46. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/core.py +0 -0
  47. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/dcim.py +0 -0
  48. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/extended_get.py +0 -0
  49. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/extras.py +0 -0
  50. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/ip_addresses.py +0 -0
  51. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/ipam.py +0 -0
  52. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/plugins_ca.py +0 -0
  53. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/status.py +0 -0
  54. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/tenancy.py +0 -0
  55. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/users.py +0 -0
  56. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/virtualization.py +0 -0
  57. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/api/wireless.py +0 -0
  58. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/branch/__init__.py +0 -0
  59. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/branch/nb_branch.py +0 -0
  60. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/branch/nb_value.py +0 -0
  61. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/exceptions.py +0 -0
  62. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/foragers/__init__.py +0 -0
  63. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/foragers/base_fa.py +0 -0
  64. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/foragers/circuits.py +0 -0
  65. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/foragers/core.py +0 -0
  66. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/foragers/dcim.py +0 -0
  67. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/foragers/extras.py +0 -0
  68. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/foragers/forager.py +0 -0
  69. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/foragers/ipam.py +0 -0
  70. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/foragers/ipv4.py +0 -0
  71. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/foragers/joiner.py +0 -0
  72. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/foragers/tenancy.py +0 -0
  73. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/foragers/users.py +0 -0
  74. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/foragers/virtualization.py +0 -0
  75. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/foragers/wireless.py +0 -0
  76. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/helpers.py +0 -0
  77. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/log.py +0 -0
  78. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/messages.py +0 -0
  79. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/nb_api.py +0 -0
  80. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/nb_cache.py +0 -0
  81. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/nb_forager.py +0 -0
  82. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/nb_tree.py +0 -0
  83. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/py.typed +0 -0
  84. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/types_.py +0 -0
  85. {nbforager-0.1.14 → nbforager-0.1.15}/nbforager/wrappers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: nbforager
3
- Version: 0.1.14
3
+ Version: 0.1.15
4
4
  Summary: Python package designed to assist in working with the Netbox REST API. The filter parameters are identical to those in the Web UI filter form. It replaces brief data with full information, and Netbox objects are represented as a recursive multidimensional dictionary.
5
5
  Home-page: https://github.com/vladimirs-git/nbforager
6
6
  License: Apache-2.0
@@ -25,7 +25,7 @@ Requires-Dist: requests (>=2,<3)
25
25
  Requires-Dist: tomli (==2.0.1)
26
26
  Requires-Dist: vhelpers (>=0.1,<0.2)
27
27
  Project-URL: Bug Tracker, https://github.com/vladimirs-git/nbforager/issues
28
- Project-URL: Download URL, https://github.com/vladimirs-git/nbforager/archive/refs/tags/0.1.14.tar.gz
28
+ Project-URL: Download URL, https://github.com/vladimirs-git/nbforager/archive/refs/tags/0.1.15.tar.gz
29
29
  Project-URL: Repository, https://github.com/vladimirs-git/nbforager
30
30
  Description-Content-Type: text/x-rst
31
31
 
@@ -2,11 +2,12 @@
2
2
 
3
3
  """NbCustom."""
4
4
  import re
5
+ import string
5
6
 
6
7
  from vhelpers import vlist, vre
7
8
 
8
9
  from nbforager.branch.nb_value import NbValue, RE_PREFIX
9
- from nbforager.types_ import SStr, T2Str
10
+ from nbforager.types_ import SStr, T2Str, LStr
10
11
 
11
12
 
12
13
  class NbCustom(NbValue):
@@ -36,7 +37,12 @@ class NbCustom(NbValue):
36
37
  self.strict = True
37
38
  _ = self.is_dcim("devices")
38
39
  _ = self.primary_ip4()
39
- device_type = super().platform_slug()
40
+ device_type = self.str("platform", "name")
41
+ required: str = string.ascii_lowercase + "_-"
42
+ chars_invalid: LStr = [s for s in device_type if s not in required]
43
+ if chars_invalid:
44
+ device_type = super().platform_slug()
45
+ device_type = device_type.replace("-", "_")
40
46
  self.strict = strict_actual
41
47
  return device_type
42
48
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "nbforager"
3
- version = "0.1.14"
3
+ version = "0.1.15"
4
4
  description = "Python package designed to assist in working with the Netbox REST API. The filter parameters are identical to those in the Web UI filter form. It replaces brief data with full information, and Netbox objects are represented as a recursive multidimensional dictionary."
5
5
  authors = ["Vladimirs Prusakovs <vladimir.prusakovs@gmail.com>"]
6
6
  readme = "README.rst"
@@ -52,7 +52,7 @@ test = ["pytest"]
52
52
 
53
53
  [tool.poetry.urls]
54
54
  "Bug Tracker" = "https://github.com/vladimirs-git/nbforager/issues"
55
- "Download URL" = "https://github.com/vladimirs-git/nbforager/archive/refs/tags/0.1.14.tar.gz"
55
+ "Download URL" = "https://github.com/vladimirs-git/nbforager/archive/refs/tags/0.1.15.tar.gz"
56
56
 
57
57
 
58
58
  [tool.mypy]
File without changes
File without changes