1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-10 01:17:40 +03:00

F OpenNebula/addon-context-linux#86: Update NIC parameters (#1447)

- Support METHOD and IP6_METHOD.
- Update METRIC6 to IP6_METRIC6.
- Deprecate CONTEXT_FORCE_IPV4 (unused for some time)
This commit is contained in:
Vlastimil Holer 2021-09-10 12:19:38 +02:00 committed by GitHub
parent 0174dc3930
commit 190b0c6e4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 25 additions and 23 deletions

View File

@ -63,11 +63,14 @@
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/> <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/>
<xs:element name="CONTEXT_FORCE_IPV4" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="DNS" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="DNS" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="GATEWAY" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="GATEWAY" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="GATEWAY6" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="GATEWAY6" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="GUEST_MTU" type="xs:int" minOccurs="0" maxOccurs="1"/> <xs:element name="GUEST_MTU" type="xs:int" minOccurs="0" maxOccurs="1"/>
<xs:element name="IP6_METHOD" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="IP6_METRIC" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="METHOD" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="METRIC" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="NETWORK_ADDRESS" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="NETWORK_ADDRESS" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="NETWORK_MASK" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="NETWORK_MASK" type="xs:string" minOccurs="0" maxOccurs="1"/>
<xs:element name="SEARCH_DOMAIN" type="xs:string" minOccurs="0" maxOccurs="1"/> <xs:element name="SEARCH_DOMAIN" type="xs:string" minOccurs="0" maxOccurs="1"/>

View File

@ -1054,6 +1054,9 @@ INHERIT_VNET_ATTR = "FILTER_IP_SPOOFING"
INHERIT_VNET_ATTR = "FILTER_MAC_SPOOFING" INHERIT_VNET_ATTR = "FILTER_MAC_SPOOFING"
INHERIT_VNET_ATTR = "MTU" INHERIT_VNET_ATTR = "MTU"
INHERIT_VNET_ATTR = "METRIC" INHERIT_VNET_ATTR = "METRIC"
INHERIT_VNET_ATTR = "IP6_METRIC"
INHERIT_VNET_ATTR = "METHOD"
INHERIT_VNET_ATTR = "IP6_METHOD"
INHERIT_VNET_ATTR = "INBOUND_AVG_BW" INHERIT_VNET_ATTR = "INBOUND_AVG_BW"
INHERIT_VNET_ATTR = "INBOUND_PEAK_BW" INHERIT_VNET_ATTR = "INBOUND_PEAK_BW"
INHERIT_VNET_ATTR = "INBOUND_PEAK_KB" INHERIT_VNET_ATTR = "INBOUND_PEAK_KB"

View File

@ -41,15 +41,18 @@ const (
// Contextualization template keys // Contextualization template keys
const ( const (
NetworkMask Template = "NETWORK_MASK" NetworkMask Template = "NETWORK_MASK"
NetworkAddress Template = "NETWORK_ADDRESS" NetworkAddress Template = "NETWORK_ADDRESS"
Gateway Template = "GATEWAY" Gateway Template = "GATEWAY"
Gateway6 Template = "GATEWAY6" Gateway6 Template = "GATEWAY6"
DNS Template = "DNS" DNS Template = "DNS"
GuestMTU Template = "GUEST_MTU" GuestMTU Template = "GUEST_MTU"
ContextForceIPV4 Template = "CONTEXT_FORCE_IPV4" SearchDomain Template = "SEARCH_DOMAIN"
SearchDomain Template = "SEARCH_DOMAIN" SecGroups Template = "SECURITY_GROUPS"
SecGroups Template = "SECURITY_GROUPS" Method Template = "METHOD"
Metric Template = "METRIC"
IP6Method Template = "IP6_METHOD"
IP6Metric Template = "IP6_METRIC"
) )
// Interface creation options template keys // Interface creation options template keys

View File

@ -96,7 +96,8 @@
- GATEWAY6 - GATEWAY6
- DNS - DNS
- GUEST_MTU - GUEST_MTU
- CONTEXT_FORCE_IPV4 - METRIC
- IP6_METRIC
- SEARCH_DOMAIN - SEARCH_DOMAIN
# Actions that cannot be performed on a VM # Actions that cannot be performed on a VM

View File

@ -93,7 +93,7 @@ RESTRICTED_ACTIONS = [
# Attrs of the Virtual Network template that will be retrieved # Attrs of the Virtual Network template that will be retrieved
# with onegate vnet | get /vnet/:id requests. # with onegate vnet | get /vnet/:id requests.
VNET_TEMPLATE_ATTRIBUTES = %w[NETWORK_ADDRESS NETWORK_MASK GATEWAY GATEWAY6 DNS VNET_TEMPLATE_ATTRIBUTES = %w[NETWORK_ADDRESS NETWORK_MASK GATEWAY GATEWAY6 DNS
GUEST_MTU CONTEXT_FORCE_IPV4 SEARCH_DOMAIN] GUEST_MTU SEARCH_DOMAIN METRIC IP6_METRIC]
include OpenNebula include OpenNebula

View File

@ -259,15 +259,6 @@
<input type="text" wizard_field="GATEWAY6" id="GATEWAY6" name="GATEWAY6"/> <input type="text" wizard_field="GATEWAY6" id="GATEWAY6" name="GATEWAY6"/>
</div> </div>
</div> </div>
<div class="row">
<div class="medium-6 columns">
<label for="CONTEXT_FORCE_IPV4">
{{tr "Force IPv4 context"}}
{{{tip (tr "Override force IPv4 for this IPv6 network. Values: Yes or No.")}}}
</label>
<input type="text" wizard_field="CONTEXT_FORCE_IPV4" id="CONTEXT_FORCE_IPV4" name="CONTEXT_FORCE_IPV4"/>
</div>
</div>
</fieldset> </fieldset>
<fieldset class="not_firecracker"> <fieldset class="not_firecracker">
<legend>{{tr "Override Network Inbound Traffic QoS"}}</legend> <legend>{{tr "Override Network Inbound Traffic QoS"}}</legend>

View File

@ -51,6 +51,7 @@ const std::vector<ContextVariable> NETWORK_CONTEXT = {
{"SEARCH_DOMAIN", "SEARCH_DOMAIN", "", true}, {"SEARCH_DOMAIN", "SEARCH_DOMAIN", "", true},
{"MTU", "GUEST_MTU", "", true}, {"MTU", "GUEST_MTU", "", true},
{"METRIC", "METRIC", "", true}, {"METRIC", "METRIC", "", true},
{"METHOD", "METHOD", "", true},
{"VLAN_ID", "VLAN_ID", "", true}, {"VLAN_ID", "VLAN_ID", "", true},
{"VROUTER_IP", "VROUTER_IP", "", false}, {"VROUTER_IP", "VROUTER_IP", "", false},
{"VROUTER_MANAGEMENT", "VROUTER_MANAGEMENT", "", false}, {"VROUTER_MANAGEMENT", "VROUTER_MANAGEMENT", "", false},
@ -61,8 +62,8 @@ const std::vector<ContextVariable> NETWORK6_CONTEXT = {
{"IP6", "IP6_GLOBAL", "IP6", false}, {"IP6", "IP6_GLOBAL", "IP6", false},
{"IP6_ULA", "IP6_ULA", "", false}, {"IP6_ULA", "IP6_ULA", "", false},
{"GATEWAY6", "GATEWAY6", "", true}, {"GATEWAY6", "GATEWAY6", "", true},
{"METRIC6", "METRIC6", "", true}, {"IP6_METRIC", "IP6_METRIC", "", true},
{"CONTEXT_FORCE_IPV4", "CONTEXT_FORCE_IPV4", "", true}, {"IP6_METHOD", "IP6_METHOD", "", true},
{"IP6_PREFIX_LENGTH", "PREFIX_LENGTH", "", true}, {"IP6_PREFIX_LENGTH", "PREFIX_LENGTH", "", true},
{"VROUTER_IP6", "VROUTER_IP6_GLOBAL", "VROUTER_IP6", false}, {"VROUTER_IP6", "VROUTER_IP6_GLOBAL", "VROUTER_IP6", false},
{"EXTERNAL", "EXTERNAL", "", false}, {"EXTERNAL", "EXTERNAL", "", false},