inmanta-module-openstack 5.1.1__tar.gz → 5.1.2__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 (58) hide show
  1. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/PKG-INFO +1 -1
  2. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_module_openstack.egg-info/PKG-INFO +1 -1
  3. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_module_openstack.egg-info/SOURCES.txt +2 -3
  4. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/common/deps.py +19 -6
  5. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/compute/virtual_machine.py +4 -2
  6. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/model/_init.cf +64 -69
  7. inmanta_module_openstack-5.1.1/inmanta_plugins/openstack/compute/host_port.py → inmanta_module_openstack-5.1.2/inmanta_plugins/openstack/network/network_port.py +172 -56
  8. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/trunk_network.py +2 -2
  9. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/setup.cfg +1 -1
  10. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/setup.cfg +1 -1
  11. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_dependency_handling.py +6 -6
  12. inmanta_module_openstack-5.1.1/tests/test_host_port_fixed_ips.py → inmanta_module_openstack-5.1.2/tests/test_network_port_fixed_ips.py +14 -14
  13. inmanta_module_openstack-5.1.1/tests/test_host_port_security_groups.py → inmanta_module_openstack-5.1.2/tests/test_network_port_security_groups.py +8 -8
  14. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_neutron.py +28 -26
  15. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_trunk.py +72 -0
  16. inmanta_module_openstack-5.1.1/inmanta_plugins/openstack/network/network_port.py +0 -177
  17. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/MANIFEST.in +0 -0
  18. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/README.md +0 -0
  19. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_module_openstack.egg-info/dependency_links.txt +0 -0
  20. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_module_openstack.egg-info/not-zip-safe +0 -0
  21. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_module_openstack.egg-info/requires.txt +0 -0
  22. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_module_openstack.egg-info/top_level.txt +0 -0
  23. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/__init__.py +0 -0
  24. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/common/__init__.py +0 -0
  25. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/common/base.py +0 -0
  26. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/compute/__init__.py +0 -0
  27. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/compute/flavor.py +0 -0
  28. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/compute/host_aggregate.py +0 -0
  29. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/identity/__init__.py +0 -0
  30. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/identity/group.py +0 -0
  31. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/identity/group_role.py +0 -0
  32. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/identity/keystone_base.py +0 -0
  33. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/identity/project.py +0 -0
  34. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/identity/role.py +0 -0
  35. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/identity/user.py +0 -0
  36. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/image/__init__.py +0 -0
  37. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/image/image.py +0 -0
  38. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/__init__.py +0 -0
  39. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/floating_ip.py +0 -0
  40. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/network.py +0 -0
  41. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/qos_policy.py +0 -0
  42. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/router.py +0 -0
  43. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/router_port.py +0 -0
  44. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/security_group.py +0 -0
  45. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/subnet.py +0 -0
  46. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/subnet_v6.py +0 -0
  47. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/trunk_port.py +0 -0
  48. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/quota/__init__.py +0 -0
  49. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/quota/quota.py +0 -0
  50. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/pyproject.toml +0 -0
  51. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_block_devices.py +0 -0
  52. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_examples.py +0 -0
  53. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_flavor.py +0 -0
  54. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_host_aggregate.py +0 -0
  55. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_image.py +0 -0
  56. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_keystone.py +0 -0
  57. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_nova.py +0 -0
  58. {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_quota.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: inmanta-module-openstack
3
- Version: 5.1.1
3
+ Version: 5.1.2
4
4
  License: Apache 2.0
5
5
  Requires-Dist: inmanta-module-ssh
6
6
  Requires-Dist: inmanta-module-std
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: inmanta-module-openstack
3
- Version: 5.1.1
3
+ Version: 5.1.2
4
4
  License: Apache 2.0
5
5
  Requires-Dist: inmanta-module-ssh
6
6
  Requires-Dist: inmanta-module-std
@@ -16,7 +16,6 @@ inmanta_plugins/openstack/common/deps.py
16
16
  inmanta_plugins/openstack/compute/__init__.py
17
17
  inmanta_plugins/openstack/compute/flavor.py
18
18
  inmanta_plugins/openstack/compute/host_aggregate.py
19
- inmanta_plugins/openstack/compute/host_port.py
20
19
  inmanta_plugins/openstack/compute/virtual_machine.py
21
20
  inmanta_plugins/openstack/identity/__init__.py
22
21
  inmanta_plugins/openstack/identity/group.py
@@ -47,10 +46,10 @@ tests/test_dependency_handling.py
47
46
  tests/test_examples.py
48
47
  tests/test_flavor.py
49
48
  tests/test_host_aggregate.py
50
- tests/test_host_port_fixed_ips.py
51
- tests/test_host_port_security_groups.py
52
49
  tests/test_image.py
53
50
  tests/test_keystone.py
51
+ tests/test_network_port_fixed_ips.py
52
+ tests/test_network_port_security_groups.py
54
53
  tests/test_neutron.py
55
54
  tests/test_nova.py
56
55
  tests/test_quota.py
@@ -32,7 +32,7 @@ MANAGED_DEPENDENCIES = {
32
32
  "openstack::Router",
33
33
  "openstack::Subnet",
34
34
  "openstack::VirtualMachine",
35
- "openstack::HostPort",
35
+ "openstack::NetworkPort",
36
36
  "openstack::FloatingIP",
37
37
  "openstack::SecurityGroup",
38
38
  }
@@ -66,15 +66,21 @@ def set_dependencies_on_purged_resources(collector: ResourceCollector) -> None:
66
66
  Set the dependencies between purged VMs/ports and the security groups they reference.
67
67
  """
68
68
  vms = collector.get("openstack::VirtualMachine", {})
69
- ports = collector.get("openstack::HostPort", {})
69
+ ports = collector.get("openstack::NetworkPort", {})
70
70
  sgs = collector.get("openstack::SecurityGroup", {})
71
71
 
72
72
  # When the VM is purged, all its purged ports should be deployed first
73
73
  for vm in vms.values():
74
74
  for vm_port in vm.ports:
75
75
  if vm_port["name"] in ports:
76
- port_id = ports[vm_port["name"]].id
77
- vm.requires.add(port_id)
76
+ port = ports[vm_port["name"]]
77
+ if port.is_trunk_parent:
78
+ # The vm boots on (and binds) its trunk parent port, so the vm must be
79
+ # torn down before the port. This mirrors the create-time inversion and
80
+ # avoids a cycle with the trunk (which is deleted before its parent).
81
+ port.requires.add(vm.id)
82
+ else:
83
+ vm.requires.add(port.id)
78
84
 
79
85
  # When a security group is purged, every port referencing it must be removed (or have the
80
86
  # reference dropped) before the group itself can be deleted.
@@ -90,7 +96,7 @@ def set_dependencies_on_non_purged_resources(collector: ResourceCollector) -> No
90
96
  routers = collector.get("openstack::Router", {})
91
97
  subnets = collector.get("openstack::Subnet", {})
92
98
  vms = collector.get("openstack::VirtualMachine", {})
93
- ports = collector.get("openstack::HostPort", {})
99
+ ports = collector.get("openstack::NetworkPort", {})
94
100
  fips = collector.get("openstack::FloatingIP", {})
95
101
  sgs = collector.get("openstack::SecurityGroup", {})
96
102
  router_map = {}
@@ -143,7 +149,14 @@ def set_dependencies_on_non_purged_resources(collector: ResourceCollector) -> No
143
149
  port.requires.add(subnets[port.network].id)
144
150
 
145
151
  if port.host in vms:
146
- port.requires.add(vms[port.host].id)
152
+ if port.is_trunk_parent:
153
+ # A trunk parent must exist (unbound) before its vm: the trunk is built
154
+ # on it and the vm then boots on the pre-created port. Ordering the port
155
+ # after the vm would both bind it too early (neutron rejects a trunk on a
156
+ # bound port) and cycle with the trunk (vm -> trunk -> parent port).
157
+ vms[port.host].requires.add(port.id)
158
+ else:
159
+ port.requires.add(vms[port.host].id)
147
160
 
148
161
  for sg_name in port.security_groups:
149
162
  if sg_name in sgs:
@@ -183,7 +183,9 @@ class VirtualMachineHandler(OpenStackHandler):
183
183
  @cache(timeout=10, cache_none=False)
184
184
  def _port_id(self, port_name):
185
185
  ports = self._connection.network.ports(name=port_name)
186
- return self.require_single_item(ports)
186
+ port = self.require_single_item(ports)
187
+ # Nova expects the port id (a string) in the boot NIC, not the port object.
188
+ return port.id if port is not None else None
187
189
 
188
190
  @cache(timeout=10, cache_none=False)
189
191
  def _get_subnet_id(self, subnet_name):
@@ -204,7 +206,7 @@ class VirtualMachineHandler(OpenStackHandler):
204
206
  raise SkipResource(f"Network {port['network']} not found")
205
207
  nic = {"uuid": network}
206
208
  # A boot NIC carries a single fixed_ip. A dual-stack port boots with its
207
- # IPv4 here (preserving its port_index slot); the HostPort handler adds the
209
+ # IPv4 here (preserving its port_index slot); the NetworkPort handler adds the
208
210
  # IPv6 to the same port afterwards via update_port, which keeps the slot.
209
211
  if port["address"] is not None:
210
212
  nic["fixed_ip"] = port["address"]
@@ -345,47 +345,6 @@ implement RouterPort using providerRequire
345
345
 
346
346
  RouterPort.subnet [1] -- Subnet.routers [0:]
347
347
 
348
- entity HostPort extends Port:
349
- """
350
- A port attached to a VM
351
-
352
- :param name: The name of the host port.
353
- :param address: An optional fixed IPv4 to request. When omitted neutron assigns one; leave unset
354
- for an IPv6-only port. Ignored when dhcp is true.
355
- :param address_v6: An optional fixed IPv6 to request from an IPv6 subnet on the port's network.
356
- When omitted no IPv6 is requested. Ignored when dhcp is true.
357
- :param portsecurity: Enable or disable port security (security groups and spoofing filters)
358
- :param dhcp: Enable dhcp for this port or not for this port
359
- :param port_index: The index of the port. This determines the order of the interfaces on the virtual machine. 0 means no specific order.
360
- :param retries: A hostport can only be attached to a VM when it is in an active state. The handler will skip this port when the VM is not ready. To
361
- speed up deployments, the handler can retry this number of times before skipping the resource.
362
- :param wait: The number of seconds to wait between retries.
363
- """
364
- std::ipv4_address? address = null
365
- std::ipv6_address? address_v6 = null
366
- bool portsecurity=true
367
- bool dhcp=true
368
- int port_index=0
369
- int retries=20
370
- int wait=5
371
- end
372
-
373
- implementation noSecurityGroupsWhenPortSecurityDisabled for HostPort:
374
- # Security groups can only be enforced on a port when port security is enabled.
375
- std::assert(
376
- std::count(self.security_groups) == 0,
377
- "HostPort '{{name}}' cannot have security_groups assigned while portsecurity is disabled."
378
- )
379
- end
380
-
381
- implement HostPort using providerRequire
382
- implement HostPort using noSecurityGroupsWhenPortSecurityDisabled when not self.portsecurity
383
-
384
- HostPort.subnet [1] -- SubnetBase.host_ports [0:]
385
- HostPort.vm [1] -- VirtualMachine.ports [0:]
386
-
387
- index HostPort(provider, vm, name)
388
-
389
348
  entity SubnetBase extends OpenStackResource:
390
349
  """
391
350
  A neutron subnet
@@ -507,32 +466,66 @@ implement QoSPolicy using providerRequire
507
466
 
508
467
  entity NetworkPort extends Port:
509
468
  """
510
- A standalone neutron port, managed directly on a network and not bound
511
- to a router or a virtual machine. This mirrors the
512
- ``openstack port create --network <network> <name>`` command and is
513
- suitable as the parent port of a :py:class:`TrunkNetwork`.
514
-
469
+ A neutron port. By default it is a standalone port, managed directly on a
470
+ network and not bound to a virtual machine -- this mirrors the
471
+ ``openstack port create --network <network> <name>`` command and is suitable
472
+ as the parent port of a :py:class:`TrunkNetwork`. Setting the ``vm`` relation
473
+ instead attaches the port to that virtual machine.
474
+
475
+ The port lives on an explicit ``network`` or, when only a ``subnet`` is given,
476
+ on that subnet's network.
477
+
478
+ :attr address: An optional fixed IPv4 to request. When omitted neutron assigns one; leave
479
+ unset for an IPv6-only port. Ignored on a vm-attached port when dhcp is true
480
+ (a standalone port always takes the address it is given).
481
+ :attr address_v6: An optional fixed IPv6 to request from an IPv6 subnet on the port's
482
+ network. When omitted no IPv6 is requested. Ignored when dhcp is true.
483
+ :attr mac_address: An optional MAC address for the port. When omitted, neutron assigns one.
484
+ It is typed as a plain string (not the ``mac_addr`` typedef) so it can hold a
485
+ fact reference resolved at deploy time, e.g.
486
+ ``future::std::create_fact_reference(parent_port, "mac_address")`` to make a
487
+ trunk sub-port share its parent port's MAC. Set only at creation; neutron does
488
+ not allow changing it afterwards.
515
489
  :attr portsecurity: Enable or disable port security (security groups and spoofing filters).
516
- :attr address: An optional fixed ip address for the port. When omitted, neutron
517
- assigns one from the network. When set, a subnet must be provided.
518
- :attr mac_address: An optional MAC address for the port. When omitted, neutron
519
- assigns one. It is typed as a plain string (not the ``mac_addr``
520
- typedef) so it can hold a fact reference resolved at deploy time,
521
- e.g. ``future::std::create_fact_reference(parent_port, "mac_address")``
522
- to make a trunk sub-port share its parent port's MAC. Set only at
523
- creation; neutron does not allow changing it afterwards.
490
+ :attr dhcp: Enable dhcp for this port or not. Only relevant when the port is attached to a vm.
491
+ :attr port_index: The index of the port. This determines the order of the interfaces on the
492
+ virtual machine. 0 means no specific order. Only relevant when the port is
493
+ attached to a vm.
494
+ :attr retries: A port attached to a vm can only be attached when the vm is in an active state.
495
+ The handler will skip this port when the vm is not ready. To speed up
496
+ deployments, the handler can retry this number of times before skipping.
497
+ :attr wait: The number of seconds to wait between retries.
524
498
  """
499
+ std::ipv4_address? address = null
500
+ std::ipv6_address? address_v6 = null
501
+ string? mac_address = null
525
502
  bool portsecurity=true
526
- std::ipv4_address? address=null
527
- string? mac_address=null
503
+ bool dhcp=true
504
+ int port_index=0
505
+ int retries=20
506
+ int wait=5
528
507
  end
529
508
 
530
- index NetworkPort(project, name)
531
-
532
- NetworkPort.network [1] -- Network.network_ports [0:]
533
- NetworkPort.subnet [0:1] -- Subnet.network_ports [0:]
509
+ implementation noSecurityGroupsWhenPortSecurityDisabled for NetworkPort:
510
+ # Security groups can only be enforced on a port when port security is enabled.
511
+ std::assert(
512
+ std::count(self.security_groups) == 0,
513
+ "NetworkPort '{{name}}' cannot have security_groups assigned while portsecurity is disabled."
514
+ )
515
+ end
534
516
 
535
517
  implement NetworkPort using providerRequire
518
+ implement NetworkPort using noSecurityGroupsWhenPortSecurityDisabled when not self.portsecurity
519
+
520
+ index NetworkPort(project, name)
521
+
522
+ # The port lives on an explicit network, or derives it from its subnet when only the
523
+ # subnet is given.
524
+ NetworkPort.network [0:1] -- Network.network_ports [0:]
525
+ NetworkPort.subnet [0:1] -- SubnetBase.network_ports [0:]
526
+ # When set, the port is attached to this virtual machine. Left unset, the port is a
527
+ # standalone port (e.g. the parent port of a trunk).
528
+ NetworkPort.vm [0:1] -- VirtualMachine.ports [0:]
536
529
 
537
530
 
538
531
  entity TrunkNetwork extends OpenStackResource:
@@ -541,9 +534,11 @@ entity TrunkNetwork extends OpenStackResource:
541
534
  subports (see :py:class:`TrunkPort`) so that a single VM interface can
542
535
  carry traffic for multiple networks using VLAN tagging.
543
536
 
544
- The trunk is built on top of an existing parent port. That port can be a
545
- standalone :py:class:`NetworkPort` or a :py:class:`HostPort` attached to
546
- a virtual machine. The parent port is managed separately.
537
+ The trunk is built on top of an existing parent port (a
538
+ :py:class:`NetworkPort`). Neutron only accepts a parent port that is not yet
539
+ bound to a virtual machine, so when the trunk parent is attached to a vm the
540
+ port must be created (and the trunk built on it) before the vm boots on it.
541
+ The parent port is managed separately.
547
542
 
548
543
  :attr name: The name of the trunk. Must be unique per project.
549
544
  :attr description: An optional human-readable description.
@@ -565,8 +560,8 @@ implement TrunkNetwork using providerRequire
565
560
 
566
561
  entity TrunkPort extends OpenStackResource:
567
562
  """
568
- A subport of a :py:class:`TrunkNetwork`. It attaches an existing port
569
- (a :py:class:`NetworkPort` or :py:class:`HostPort`) to the trunk with the
563
+ A subport of a :py:class:`TrunkNetwork`. It attaches an existing
564
+ :py:class:`NetworkPort` to the trunk with the
570
565
  configured segmentation type and id (typically a VLAN). The referenced
571
566
  port is managed separately; this resource only manages the trunk
572
567
  subport attachment, not the port itself.
@@ -639,7 +634,7 @@ end
639
634
  SecurityGroup.provider [1] -- Provider.security_groups [0:]
640
635
  SecurityGroup.project [1] -- Project.security_groups [0:]
641
636
  SecurityGroup.virtual_machines [0:] -- VirtualMachine.security_groups [0:]
642
- HostPort.security_groups [0:] -- SecurityGroup
637
+ NetworkPort.security_groups [0:] -- SecurityGroup
643
638
  """
644
639
  :rel security_groups: The security groups to enforce on this port. When left empty (the default), the
645
640
  port's security groups are left unmanaged for backward compatibility: existing groups (including the
@@ -698,7 +693,7 @@ implement FloatingIP using fipAddr when not force_ip
698
693
  FloatingIP.project [1] -- Project.floating_ips [0:]
699
694
  FloatingIP.provider [1] -- Provider.floating_ips [0:]
700
695
  FloatingIP.external_network [1] -- Network.floating_ips [0:]
701
- FloatingIP.port [1] -- HostPort.floating_ips [0:]
696
+ FloatingIP.port [1] -- NetworkPort.floating_ips [0:]
702
697
 
703
698
  entity VMAttributes:
704
699
  """
@@ -727,7 +722,7 @@ end
727
722
 
728
723
  index VirtualMachine(provider, name)
729
724
 
730
- VirtualMachine.eth0_port [1] -- HostPort
725
+ VirtualMachine.eth0_port [1] -- NetworkPort
731
726
  VirtualMachine.key_pair [1] -- ssh::Key
732
727
  VirtualMachine.project [1] -- Project
733
728
  VirtualMachine.provider [1] -- Provider.virtual_machines [0:]
@@ -762,7 +757,7 @@ Host.provider [1] -- Provider
762
757
  Host.security_groups [0:] -- SecurityGroup
763
758
 
764
759
  implementation eth0Port for Host:
765
- port = HostPort(provider=provider, vm=self.vm, subnet=subnet, name="{{name}}_eth0", address=std::getfact(self.vm, "ip_address"),
760
+ port = NetworkPort(provider=provider, vm=self.vm, subnet=subnet, name="{{name}}_eth0", address=std::getfact(self.vm, "ip_address"),
766
761
  project=project, port_index=1, purged=purged, purge_on_delete=self.purge_on_delete)
767
762
  self.vm.eth0_port = port
768
763
  end