mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-22 18:50:08 +03:00
#2851: Send network drivers xml via STDIN
This commit is contained in:
parent
7e14b181e4
commit
8121175b6e
@ -221,8 +221,12 @@ class VmmAction
|
||||
vnm = @vnm_src
|
||||
end
|
||||
|
||||
result, info = vnm.do_action(@id, step[:action],
|
||||
:parameters => get_parameters(step[:parameters]))
|
||||
params = get_parameters(step[:parameters])
|
||||
|
||||
result, info = vnm.do_action(@id,
|
||||
step[:action],
|
||||
:stdin => true,
|
||||
:parameters => params)
|
||||
when :tm
|
||||
result, info = @tm.do_transfer_action(@id, step[:parameters])
|
||||
|
||||
|
@ -52,7 +52,7 @@ class VirtualNetworkDriver
|
||||
:parameters => nil
|
||||
}.merge(ops)
|
||||
|
||||
cmd_params = "#{@vm_encoded}"
|
||||
cmd_params = ''
|
||||
cmd_params << " #{options[:parameters]}" if options[:parameters]
|
||||
|
||||
result = RESULT[:success]
|
||||
@ -66,7 +66,7 @@ class VirtualNetworkDriver
|
||||
elsif @ssh_stream != nil
|
||||
if options[:stdin]
|
||||
cmdin = "cat << EOT | #{cmd}"
|
||||
stdin = "#{options[:stdin]}\nEOT\n"
|
||||
stdin = "#{@vm_encoded}\nEOT\n"
|
||||
else
|
||||
cmdin = cmd
|
||||
stdin = nil
|
||||
|
@ -21,7 +21,7 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'vlan_tag_driver'
|
||||
|
||||
template64 = ARGV[0]
|
||||
template64 = STDIN.read
|
||||
deploy_id = nil
|
||||
xpath_filter = VLANTagDriver::XPATH_FILTER
|
||||
|
||||
|
@ -21,8 +21,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'vlan_tag_driver'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = VLANTagDriver::XPATH_FILTER
|
||||
|
||||
begin
|
||||
|
@ -21,8 +21,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'vlan_tag_driver'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = VLANTagDriver::XPATH_FILTER
|
||||
|
||||
hm = VLANTagDriver.from_base64(template64, xpath_filter, deploy_id)
|
||||
|
@ -22,8 +22,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
require 'vnmmad'
|
||||
require 'vlan_tag_driver'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = VLANTagDriver::XPATH_FILTER
|
||||
|
||||
begin
|
||||
|
@ -21,7 +21,7 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'vnmmad'
|
||||
|
||||
template64 = ARGV[0]
|
||||
template64 = STDIN.read
|
||||
deploy_id = nil
|
||||
xpath_filter = "TEMPLATE/NIC[VN_MAD='bridge']"
|
||||
|
||||
|
@ -16,13 +16,13 @@
|
||||
# limitations under the License. #
|
||||
#--------------------------------------------------------------------------- #
|
||||
|
||||
$: << File.dirname(__FILE__)
|
||||
$: << File.join(File.dirname(__FILE__), "..")
|
||||
$LOAD_PATH << File.dirname(__FILE__)
|
||||
$LOAD_PATH << File.join(File.dirname(__FILE__), '..')
|
||||
|
||||
require 'vnmmad'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = "TEMPLATE/NIC[VN_MAD='bridge']"
|
||||
|
||||
hm = VNMMAD::NoVLANDriver.from_base64(template64, xpath_filter, deploy_id)
|
||||
|
@ -21,7 +21,7 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'Ebtables'
|
||||
|
||||
template64 = ARGV[0]
|
||||
template64 = STDIN.read
|
||||
deploy_id = nil
|
||||
xpath_filter = EbtablesVLAN::XPATH_FILTER
|
||||
|
||||
|
@ -21,8 +21,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'Ebtables'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = EbtablesVLAN::XPATH_FILTER
|
||||
|
||||
onevlan = EbtablesVLAN.from_base64(template64, xpath_filter, deploy_id)
|
||||
|
@ -21,8 +21,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'Ebtables'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = EbtablesVLAN::XPATH_FILTER
|
||||
|
||||
onevlan = EbtablesVLAN.from_base64(template64, xpath_filter, deploy_id)
|
||||
|
@ -22,8 +22,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
require 'vnmmad'
|
||||
require 'Ebtables'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = EbtablesVLAN::XPATH_FILTER
|
||||
|
||||
begin
|
||||
|
@ -21,7 +21,7 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'vnmmad'
|
||||
|
||||
template64 = ARGV[0]
|
||||
template64 = STDIN.read
|
||||
deploy_id = nil
|
||||
xpath_filter = "TEMPLATE/NIC[VN_MAD='fw']"
|
||||
|
||||
|
@ -21,8 +21,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'vnmmad'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = "TEMPLATE/NIC[VN_MAD='fw']"
|
||||
|
||||
begin
|
||||
|
@ -21,8 +21,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'vnmmad'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = "TEMPLATE/NIC[VN_MAD='fw']"
|
||||
|
||||
hm = VNMMAD::NoVLANDriver.from_base64(template64, xpath_filter, deploy_id)
|
||||
|
@ -21,8 +21,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'vnmmad'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = "TEMPLATE/NIC[VN_MAD='fw']"
|
||||
|
||||
begin
|
||||
|
@ -21,7 +21,7 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'OpenvSwitch'
|
||||
|
||||
template64 = ARGV[0]
|
||||
template64 = STDIN.read
|
||||
deploy_id = nil
|
||||
xpath_filter = OpenvSwitchVLAN::XPATH_FILTER
|
||||
|
||||
|
@ -21,8 +21,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'OpenvSwitch'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = OpenvSwitchVLAN::XPATH_FILTER
|
||||
|
||||
ovs = OpenvSwitchVLAN.from_base64(template64, xpath_filter, deploy_id)
|
||||
|
@ -21,8 +21,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'OpenvSwitch'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = OpenvSwitchVLAN::XPATH_FILTER
|
||||
|
||||
ovs = OpenvSwitchVLAN.from_base64(template64, xpath_filter, deploy_id)
|
||||
|
@ -21,7 +21,7 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'OpenvSwitchVXLAN'
|
||||
|
||||
template64 = ARGV[0]
|
||||
template64 = STDIN.read
|
||||
deploy_id = nil
|
||||
xpath_filter = OpenvSwitchVXLAN::XPATH_FILTER
|
||||
|
||||
|
@ -21,8 +21,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'OpenvSwitchVXLAN'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = OpenvSwitchVXLAN::XPATH_FILTER
|
||||
|
||||
ovs = OpenvSwitchVXLAN.from_base64(template64, xpath_filter, deploy_id)
|
||||
|
@ -21,8 +21,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'OpenvSwitchVXLAN'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = OpenvSwitchVXLAN::XPATH_FILTER
|
||||
|
||||
ovs = OpenvSwitchVXLAN.from_base64(template64, xpath_filter, deploy_id)
|
||||
|
@ -21,7 +21,7 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'vxlan_driver'
|
||||
|
||||
template64 = ARGV[0]
|
||||
template64 = STDIN.read
|
||||
deploy_id = nil
|
||||
xpath_filter = VXLANDriver::XPATH_FILTER
|
||||
|
||||
|
@ -21,8 +21,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'vxlan_driver'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = VXLANDriver::XPATH_FILTER
|
||||
|
||||
begin
|
||||
|
@ -21,8 +21,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
|
||||
require 'vxlan_driver'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = VXLANDriver::XPATH_FILTER
|
||||
|
||||
|
||||
|
@ -22,8 +22,8 @@ $: << File.join(File.dirname(__FILE__), "..")
|
||||
require 'vnmmad'
|
||||
require 'vxlan_driver'
|
||||
|
||||
template64 = ARGV[0]
|
||||
deploy_id = ARGV[1]
|
||||
template64 = STDIN.read
|
||||
deploy_id = ARGV[0]
|
||||
xpath_filter = VXLANDriver::XPATH_FILTER
|
||||
|
||||
begin
|
||||
|
Loading…
x
Reference in New Issue
Block a user