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.
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/PKG-INFO +1 -1
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_module_openstack.egg-info/PKG-INFO +1 -1
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_module_openstack.egg-info/SOURCES.txt +2 -3
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/common/deps.py +19 -6
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/compute/virtual_machine.py +4 -2
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/model/_init.cf +64 -69
- 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
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/trunk_network.py +2 -2
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/setup.cfg +1 -1
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/setup.cfg +1 -1
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_dependency_handling.py +6 -6
- 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
- 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
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_neutron.py +28 -26
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_trunk.py +72 -0
- inmanta_module_openstack-5.1.1/inmanta_plugins/openstack/network/network_port.py +0 -177
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/MANIFEST.in +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/README.md +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_module_openstack.egg-info/dependency_links.txt +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_module_openstack.egg-info/not-zip-safe +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_module_openstack.egg-info/requires.txt +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_module_openstack.egg-info/top_level.txt +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/__init__.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/common/__init__.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/common/base.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/compute/__init__.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/compute/flavor.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/compute/host_aggregate.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/identity/__init__.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/identity/group.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/identity/group_role.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/identity/keystone_base.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/identity/project.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/identity/role.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/identity/user.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/image/__init__.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/image/image.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/__init__.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/floating_ip.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/network.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/qos_policy.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/router.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/router_port.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/security_group.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/subnet.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/subnet_v6.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/network/trunk_port.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/quota/__init__.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/inmanta_plugins/openstack/quota/quota.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/pyproject.toml +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_block_devices.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_examples.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_flavor.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_host_aggregate.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_image.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_keystone.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_nova.py +0 -0
- {inmanta_module_openstack-5.1.1 → inmanta_module_openstack-5.1.2}/tests/test_quota.py +0 -0
|
@@ -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::
|
|
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::
|
|
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
|
-
|
|
77
|
-
|
|
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::
|
|
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.
|
|
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
|
-
|
|
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
|
|
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
|
|
511
|
-
|
|
512
|
-
``openstack port create --network <network> <name>`` command and is
|
|
513
|
-
|
|
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
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
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
|
-
|
|
527
|
-
|
|
503
|
+
bool dhcp=true
|
|
504
|
+
int port_index=0
|
|
505
|
+
int retries=20
|
|
506
|
+
int wait=5
|
|
528
507
|
end
|
|
529
508
|
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
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
|
|
545
|
-
|
|
546
|
-
a virtual machine
|
|
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
|
|
569
|
-
|
|
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
|
-
|
|
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] --
|
|
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] --
|
|
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 =
|
|
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
|