mirror of
https://github.com/OpenNebula/one.git
synced 2025-02-22 17:57:46 +03:00
feature #3848: VN_MAD is set for VirtualNetworks in Sunstone. Removed
host vnet option
This commit is contained in:
parent
9552ccfbd6
commit
9c60fc55d9
@ -73,8 +73,10 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
static VirtualNetworkDriver str_to_driver(const string& ob)
|
||||
static VirtualNetworkDriver str_to_driver(string& ob)
|
||||
{
|
||||
one_util::toupper(ob);
|
||||
|
||||
if ( ob == "dummy" )
|
||||
{
|
||||
return DUMMY;
|
||||
|
@ -121,20 +121,12 @@ define(function(require) {
|
||||
|
||||
$("#vnetCreateARTab #vnetCreateARTabUpdate", context).hide();
|
||||
|
||||
$('#vn_mad_from_host', context).change(function() {
|
||||
if ($(this).prop('checked')) {
|
||||
$('select#network_mode,label[for="network_mode"]', context).prop('wizard_field_disabled', true);
|
||||
} else {
|
||||
$('select#network_mode,label[for="network_mode"]', context).prop('wizard_field_disabled', false);
|
||||
}
|
||||
});
|
||||
|
||||
$('#network_mode', context).change(function() {
|
||||
$('input,label[for!="network_mode"]', $(this).parent()).hide();
|
||||
$('input', $(this).parent()).val("");
|
||||
switch ($(this).val()) {
|
||||
case "default":
|
||||
$('input#vn_mad_from_host,label[for="vn_mad_from_host"]', context).show();
|
||||
case "fw":
|
||||
$('input#vn_mad,label[for="vn_mad"]', context).hide().prop('wizard_field_disabled', true);
|
||||
$('input#bridge,label[for="bridge"]', context).show().prop('wizard_field_disabled', false);
|
||||
$('input#phydev,label[for="phydev"]', context).hide().prop('wizard_field_disabled', true);
|
||||
@ -148,7 +140,6 @@ define(function(require) {
|
||||
$('input#vn_mad', context).removeAttr('required');
|
||||
break;
|
||||
case "802.1Q":
|
||||
$('input#vn_mad_from_host,label[for="vn_mad_from_host"]', context).show();
|
||||
$('input#vn_mad,label[for="vn_mad"]', context).hide().prop('wizard_field_disabled', true);
|
||||
$('input#bridge,label[for="bridge"]', context).show().prop('wizard_field_disabled', false);
|
||||
$('input#phydev,label[for="phydev"]', context).show().prop('wizard_field_disabled', false);
|
||||
@ -162,7 +153,6 @@ define(function(require) {
|
||||
$('input#vn_mad', context).removeAttr('required');
|
||||
break;
|
||||
case "vxlan":
|
||||
$('input#vn_mad_from_host,label[for="vn_mad_from_host"]', context).show();
|
||||
$('input#vn_mad,label[for="vn_mad"]', context).hide().prop('wizard_field_disabled', true);
|
||||
$('input#bridge,label[for="bridge"]', context).show().prop('wizard_field_disabled', false);
|
||||
$('input#phydev,label[for="phydev"]', context).show().prop('wizard_field_disabled', false);
|
||||
@ -176,7 +166,6 @@ define(function(require) {
|
||||
$('input#vn_mad', context).removeAttr('required');
|
||||
break;
|
||||
case "ebtables":
|
||||
$('input#vn_mad_from_host,label[for="vn_mad_from_host"]', context).show();
|
||||
$('input#vn_mad,label[for="vn_mad"]', context).hide().prop('wizard_field_disabled', true);
|
||||
$('input#bridge,label[for="bridge"]', context).show().prop('wizard_field_disabled', false);
|
||||
$('input#phydev,label[for="phydev"]', context).hide().prop('wizard_field_disabled', true);
|
||||
@ -190,7 +179,6 @@ define(function(require) {
|
||||
$('input#vn_mad', context).removeAttr('required');
|
||||
break;
|
||||
case "openvswitch":
|
||||
$('input#vn_mad_from_host,label[for="vn_mad_from_host"]', context).show();
|
||||
$('input#vn_mad,label[for="vn_mad"]', context).hide().prop('wizard_field_disabled', true);
|
||||
$('input#bridge,label[for="bridge"]', context).show().prop('wizard_field_disabled', false);
|
||||
$('input#phydev,label[for="phydev"]', context).hide().prop('wizard_field_disabled', true);
|
||||
@ -204,7 +192,6 @@ define(function(require) {
|
||||
$('input#vn_mad', context).removeAttr('required');
|
||||
break;
|
||||
case "custom":
|
||||
$('input#vn_mad_from_host,label[for="vn_mad_from_host"]', context).hide();
|
||||
$('input#vn_mad,label[for="vn_mad"]', context).show().prop('wizard_field_disabled', false);
|
||||
$('input#bridge,label[for="bridge"]', context).show().prop('wizard_field_disabled', false);
|
||||
$('input#phydev,label[for="phydev"]', context).show().prop('wizard_field_disabled', false);
|
||||
@ -371,7 +358,6 @@ define(function(require) {
|
||||
|
||||
// Show all network mode inputs, and make them not required. This will change
|
||||
// if a different network model is selected
|
||||
$('input#vn_mad_from_host,label[for="vn_mad_from_host"]', context).show();
|
||||
$('input#vn_mad,label[for="vn_mad"]', context).show().prop('wizard_field_disabled', false).removeAttr('required');
|
||||
$('input#bridge,label[for="bridge"]', context).show().prop('wizard_field_disabled', false).removeAttr('required');
|
||||
$('input#phydev,label[for="phydev"]', context).show().prop('wizard_field_disabled', false).removeAttr('required');
|
||||
@ -379,13 +365,7 @@ define(function(require) {
|
||||
$('input#ip_spoofing,label[for="ip_spoofing"]', context).show().prop('wizard_field_disabled', false);
|
||||
$('input#mac_spoofing,label[for="mac_spoofing"]', context).show().prop('wizard_field_disabled', false);
|
||||
|
||||
if (element.TEMPLATE["VN_MAD"] == undefined ||
|
||||
element.TEMPLATE["VN_MAD"] == ""){
|
||||
$('input#vn_mad_from_host', context).attr("checked", "checked").change();
|
||||
} else {
|
||||
$('input#vn_mad_from_host', context).removeAttr("checked").change();
|
||||
$('input#vn_mad', context).val(element.TEMPLATE["VN_MAD"]);
|
||||
}
|
||||
$('input#vn_mad', context).val(element.TEMPLATE["VN_MAD"]);
|
||||
|
||||
WizardFields.fill($("#vnetCreateGeneralTab", context), element.TEMPLATE);
|
||||
WizardFields.fill($("#vnetCreateBridgeTab", context), element.TEMPLATE);
|
||||
|
@ -74,27 +74,17 @@
|
||||
<input type="text" wizard_field="BRIDGE" name="bridge" id="bridge" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="large-6 columns">
|
||||
<label for="vn_mad_from_host">
|
||||
<input type="checkbox" name="vn_mad_from_host" id="vn_mad_from_host" />
|
||||
{{tr "Use the network driver of the host."}}
|
||||
<span class="tip">
|
||||
{{tr "This virtual network will use the network driver from the host."}}
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="medium-6 columns">
|
||||
<label for="network_mode">
|
||||
{{tr "Network model"}}:
|
||||
<span class="tip">
|
||||
{{tr "Choose the same networking model you chose for the hosts that will use this network"}}
|
||||
{{tr "The network driver to implement the virtual network"}}
|
||||
</span>
|
||||
</label>
|
||||
<select wizard_field="VN_MAD" name="network_mode" id="network_mode">
|
||||
<option value="default">{{tr "Default"}}</option>
|
||||
<option value="fw">{{tr "Firewall"}}</option>
|
||||
<option value="802.1Q">{{tr "802.1Q"}}</option>
|
||||
<option value="vxlan">{{tr "VXLAN"}}</option>
|
||||
<option value="ebtables">{{tr "ebtables"}}</option>
|
||||
@ -113,17 +103,20 @@
|
||||
<div class="network_mode_description" value="default">
|
||||
{{tr "Default: dummy driver that doesn’t perform any network operation. Firewalling rules are also ignored."}}
|
||||
</div>
|
||||
<div class="network_mode_description" value="fw">
|
||||
{{tr "Firewall: Same as the Default driver but applies Security Group rules."}}
|
||||
</div>
|
||||
<div class="network_mode_description" value="802.1Q">
|
||||
{{tr "802.1Q: restrict network access through VLAN tagging, which also requires support from the hardware switches."}}
|
||||
{{tr "802.1Q: restrict network access through VLAN tagging, which also requires support from the hardware switches. Security Group rules are applied."}}
|
||||
</div>
|
||||
<div class="network_mode_description" value="vxlan">
|
||||
{{tr "VXLAN: creates a L2 network overlay based on the VXLAN protocol, each VLAN has associated a multicast address in the 239.0.0.0/8 range."}}
|
||||
{{tr "VXLAN: creates a L2 network overlay based on the VXLAN protocol, each VLAN has associated a multicast address in the 239.0.0.0/8 range. Security Group rules are applied."}}
|
||||
</div>
|
||||
<div class="network_mode_description" value="ebtables">
|
||||
{{tr "ebtables: restrict network access through Ebtables rules. No special hardware configuration required."}}
|
||||
{{tr "ebtables: restrict network access through Ebtables rules. No special hardware configuration required. Security Group rules are applied."}}
|
||||
</div>
|
||||
<div class="network_mode_description" value="openvswitch">
|
||||
{{tr "Open vSwitch: restrict network access with Open vSwitch Virtual Switch."}}
|
||||
{{tr "Open vSwitch: restrict network access with Open vSwitch Virtual Switch. Security Groups are not fully supported in this mode."}}
|
||||
</div>
|
||||
<div class="network_mode_description" value="custom">
|
||||
{{tr "Custom: uses a custom network driver."}}
|
||||
|
@ -14,13 +14,6 @@
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
################################################################################
|
||||
# General Options
|
||||
################################################################################
|
||||
|
||||
# Configure the initial VLAN ID tag (corresponds to vnet ID = 0)
|
||||
:start_vlan: 2
|
||||
|
||||
################################################################################
|
||||
# Open vSwitch Options
|
||||
################################################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user