fb-vmware 1.5.0__tar.gz → 1.5.3__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 (66) hide show
  1. {fb_vmware-1.5.0/lib/fb_vmware.egg-info → fb_vmware-1.5.3}/PKG-INFO +1 -1
  2. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/__init__.py +1 -1
  3. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/errors.py +8 -1
  4. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/local_version.py +1 -1
  5. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/network.py +14 -6
  6. {fb_vmware-1.5.0 → fb_vmware-1.5.3/lib/fb_vmware.egg-info}/PKG-INFO +1 -1
  7. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/LICENSE +0 -0
  8. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/MANIFEST.in +0 -0
  9. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/README.md +0 -0
  10. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/bin/get-vsphere-host-list +0 -0
  11. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/bin/get-vsphere-network-list +0 -0
  12. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/bin/get-vsphere-storage-cluster-list +0 -0
  13. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/bin/get-vsphere-vm-info +0 -0
  14. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/bin/get-vsphere-vm-list +0 -0
  15. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/about.py +0 -0
  16. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/app/__init__.py +0 -0
  17. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/app/get_host_list.py +0 -0
  18. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/app/get_network_list.py +0 -0
  19. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/app/get_storage_cluster_list.py +0 -0
  20. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/app/get_vm_info.py +0 -0
  21. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/app/get_vm_list.py +0 -0
  22. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/base.py +0 -0
  23. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/cluster.py +0 -0
  24. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/config/__init__.py +0 -0
  25. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/connect.py +0 -0
  26. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/controller.py +0 -0
  27. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/datastore.py +0 -0
  28. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/dc.py +0 -0
  29. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/disk.py +0 -0
  30. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/ds_cluster.py +0 -0
  31. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/dvs.py +0 -0
  32. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/ether.py +0 -0
  33. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/host.py +0 -0
  34. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/host_port_group.py +0 -0
  35. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/iface.py +0 -0
  36. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/obj.py +0 -0
  37. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/typed_dict.py +0 -0
  38. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/vm.py +0 -0
  39. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware/xlate.py +0 -0
  40. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware.egg-info/SOURCES.txt +0 -0
  41. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware.egg-info/dependency_links.txt +0 -0
  42. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware.egg-info/requires.txt +0 -0
  43. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/lib/fb_vmware.egg-info/top_level.txt +0 -0
  44. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/locale/de_DE/LC_MESSAGES/fb_vmware.mo +0 -0
  45. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/locale/en_US/LC_MESSAGES/fb_vmware.mo +0 -0
  46. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/setup.cfg +0 -0
  47. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/setup.py +0 -0
  48. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/general.py +0 -0
  49. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_00-errors.py +0 -0
  50. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_10-base.py +0 -0
  51. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_20-obj.py +0 -0
  52. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_31_about_info.py +0 -0
  53. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_32_cluster.py +0 -0
  54. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_33_dc.py +0 -0
  55. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_34_disk.py +0 -0
  56. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_35_datastore.py +0 -0
  57. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_36_ds_cluster.py +0 -0
  58. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_37_ether.py +0 -0
  59. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_38_iface.py +0 -0
  60. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_39_network.py +0 -0
  61. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_40_controller.py +0 -0
  62. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_41_host_port_group.py +0 -0
  63. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_50_host.py +0 -0
  64. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_55_vm.py +0 -0
  65. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_60_config.py +0 -0
  66. {fb_vmware-1.5.0 → fb_vmware-1.5.3}/test/test_70_connect.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fb_vmware
3
- Version: 1.5.0
3
+ Version: 1.5.3
4
4
  Summary: A wrapper module around the pyvmomi module to simplify work and handling.
5
5
  Home-page: https://github.com/fbrehm/fb-vmware
6
6
  Author: Frank Brehm
@@ -56,7 +56,7 @@ from .vm import VsphereVmList
56
56
  from .xlate import XLATOR
57
57
 
58
58
 
59
- __version__ = '1.5.0'
59
+ __version__ = '1.5.3'
60
60
 
61
61
  LOG = logging.getLogger(__name__)
62
62
 
@@ -18,7 +18,7 @@ from fb_tools.errors import FbHandlerError
18
18
  # Own modules
19
19
  from .xlate import XLATOR
20
20
 
21
- __version__ = '1.2.0'
21
+ __version__ = '1.3.0'
22
22
 
23
23
  _ = XLATOR.gettext
24
24
 
@@ -44,6 +44,13 @@ class VSphereHandlerError(BaseVSphereHandlerError):
44
44
  pass
45
45
 
46
46
 
47
+ # =============================================================================
48
+ class VSphereNoNetFoundError(VSphereHandlerError):
49
+ """Error class used, if no network could be found in a network dict for an IP address."""
50
+
51
+ pass
52
+
53
+
47
54
  # =============================================================================
48
55
  class VSphereNoDatastoresFoundError(FbHandlerError):
49
56
  """Special error class used, if no appropriate datastore could be found."""
@@ -11,7 +11,7 @@
11
11
  __author__ = 'Frank Brehm <frank@brehm-online.com>'
12
12
  __copyright__ = '(C) 2025 by Frank Brehm, Berlin'
13
13
  __contact__ = 'frank@brehm-online.com'
14
- __version__ = '1.5.0'
14
+ __version__ = '1.5.3'
15
15
  __license__ = 'LGPL3+'
16
16
 
17
17
  # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
@@ -23,15 +23,17 @@ from fb_tools.xlate import format_list
23
23
  from pyVmomi import vim
24
24
 
25
25
  # Own modules
26
+ from .errors import VSphereNoNetFoundError
26
27
  from .obj import DEFAULT_OBJ_STATUS
27
28
  from .obj import VsphereObject
28
29
  from .typed_dict import TypedDict
29
30
  from .xlate import XLATOR
30
31
 
31
- __version__ = '1.8.2'
32
+ __version__ = '1.8.4'
32
33
  LOG = logging.getLogger(__name__)
33
34
 
34
35
  _ = XLATOR.gettext
36
+ ngettext = XLATOR.ngettext
35
37
 
36
38
 
37
39
  # =============================================================================
@@ -383,12 +385,15 @@ class VsphereNetworkDict(TypedDict):
383
385
  have a match, will be returned.
384
386
  """
385
387
  if len(self) < 1:
386
- LOG.debug(_('Empty {what}.').format(self.__class__.__name__))
388
+ LOG.debug(_('Empty {what}.').format(what=self.__class__.__name__))
387
389
  return None
388
390
 
391
+ ips_list_str = []
392
+
389
393
  for ip in ips:
390
394
  if not ip:
391
395
  continue
396
+ ips_list_str.append(str(ip))
392
397
  LOG.debug(_('Searching VSphere network for address {} ...').format(ip))
393
398
  ipa = ipaddress.ip_address(ip)
394
399
 
@@ -403,11 +408,14 @@ class VsphereNetworkDict(TypedDict):
403
408
  desc = self.value_class.obj_desc_singular
404
409
  LOG.debug(_('Could not find {d} for IP {ip}.').format(d=desc, ip=ip))
405
410
 
406
- ips_str = format_list(str(x) for x in list(filter(bool, ips)))
407
- LOG.error(_('Could not find {d} for IP addresses {ips}.').format(
408
- d=self.value_class.obj_desc_singular, ips=ips_str))
411
+ ips_str = format_list(ips_list_str)
412
+ no_ips = len(ips_list_str)
409
413
 
410
- return None
414
+ msg = ngettext(
415
+ 'Could not find {d} for IP address {ips}.',
416
+ 'Could not find {d} for IP addresses {ips}.',
417
+ no_ips).format(d=self.value_class.obj_desc_singular, ips=ips_str)
418
+ raise VSphereNoNetFoundError(msg)
411
419
 
412
420
 
413
421
  # =============================================================================
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fb_vmware
3
- Version: 1.5.0
3
+ Version: 1.5.3
4
4
  Summary: A wrapper module around the pyvmomi module to simplify work and handling.
5
5
  Home-page: https://github.com/fbrehm/fb-vmware
6
6
  Author: Frank Brehm
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes