From 9ca8ecf3102fae378dc798bcfda74bcf6b914744 Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Wed, 30 Mar 2016 15:14:22 +0200 Subject: [PATCH] Feature #3204: Choose correct xpath filters --- src/vnm_mad/remotes/802.1Q/update_sg | 41 +++++++++++++++++++++++++- src/vnm_mad/remotes/ebtables/update_sg | 41 +++++++++++++++++++++++++- src/vnm_mad/remotes/lib/command.rb | 2 +- src/vnm_mad/remotes/vxlan/update_sg | 41 +++++++++++++++++++++++++- 4 files changed, 121 insertions(+), 4 deletions(-) mode change 120000 => 100755 src/vnm_mad/remotes/802.1Q/update_sg mode change 120000 => 100755 src/vnm_mad/remotes/ebtables/update_sg mode change 120000 => 100755 src/vnm_mad/remotes/vxlan/update_sg diff --git a/src/vnm_mad/remotes/802.1Q/update_sg b/src/vnm_mad/remotes/802.1Q/update_sg deleted file mode 120000 index 6462331a66..0000000000 --- a/src/vnm_mad/remotes/802.1Q/update_sg +++ /dev/null @@ -1 +0,0 @@ -../fw/update_sg \ No newline at end of file diff --git a/src/vnm_mad/remotes/802.1Q/update_sg b/src/vnm_mad/remotes/802.1Q/update_sg new file mode 100755 index 0000000000..a3a8a08574 --- /dev/null +++ b/src/vnm_mad/remotes/802.1Q/update_sg @@ -0,0 +1,40 @@ +#!/usr/bin/env ruby + +# -------------------------------------------------------------------------- # +# Copyright 2002-2015, OpenNebula Project, OpenNebula Systems # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +#--------------------------------------------------------------------------- # + +$: << File.dirname(__FILE__) +$: << File.join(File.dirname(__FILE__), "..") + +require 'vnmmad' +require 'vlan_tag_driver' + +template64 = ARGV[0] +deploy_id = ARGV[1] +hypervisor = nil +xpath_filter = VLANTagDriver::XPATH_FILTER + +begin + filter_driver = VNMMAD::VNMDriver.filter_driver(template64, + deploy_id, + hypervisor, + xpath_filter) + filter_driver.activate(true) +rescue Exception => e + OpenNebula.log_error(e.message) + OpenNebula.log_error(e.backtrace) + exit 1 +end diff --git a/src/vnm_mad/remotes/ebtables/update_sg b/src/vnm_mad/remotes/ebtables/update_sg deleted file mode 120000 index 6462331a66..0000000000 --- a/src/vnm_mad/remotes/ebtables/update_sg +++ /dev/null @@ -1 +0,0 @@ -../fw/update_sg \ No newline at end of file diff --git a/src/vnm_mad/remotes/ebtables/update_sg b/src/vnm_mad/remotes/ebtables/update_sg new file mode 100755 index 0000000000..e369b71f3a --- /dev/null +++ b/src/vnm_mad/remotes/ebtables/update_sg @@ -0,0 +1,40 @@ +#!/usr/bin/env ruby + +# -------------------------------------------------------------------------- # +# Copyright 2002-2015, OpenNebula Project, OpenNebula Systems # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +#--------------------------------------------------------------------------- # + +$: << File.dirname(__FILE__) +$: << File.join(File.dirname(__FILE__), "..") + +require 'vnmmad' +require 'Ebtables' + +template64 = ARGV[0] +deploy_id = ARGV[1] +hypervisor = nil +xpath_filter = EbtablesVLAN::XPATH_FILTER + +begin + filter_driver = VNMMAD::VNMDriver.filter_driver(template64, + deploy_id, + hypervisor, + xpath_filter) + filter_driver.activate(true) +rescue Exception => e + OpenNebula.log_error(e.message) + OpenNebula.log_error(e.backtrace) + exit 1 +end diff --git a/src/vnm_mad/remotes/lib/command.rb b/src/vnm_mad/remotes/lib/command.rb index ef94ed26dc..3c0036a260 100644 --- a/src/vnm_mad/remotes/lib/command.rb +++ b/src/vnm_mad/remotes/lib/command.rb @@ -83,4 +83,4 @@ module VNMNetwork end end -end \ No newline at end of file +end diff --git a/src/vnm_mad/remotes/vxlan/update_sg b/src/vnm_mad/remotes/vxlan/update_sg deleted file mode 120000 index 6462331a66..0000000000 --- a/src/vnm_mad/remotes/vxlan/update_sg +++ /dev/null @@ -1 +0,0 @@ -../fw/update_sg \ No newline at end of file diff --git a/src/vnm_mad/remotes/vxlan/update_sg b/src/vnm_mad/remotes/vxlan/update_sg new file mode 100755 index 0000000000..b7702d62a6 --- /dev/null +++ b/src/vnm_mad/remotes/vxlan/update_sg @@ -0,0 +1,40 @@ +#!/usr/bin/env ruby + +# -------------------------------------------------------------------------- # +# Copyright 2002-2015, OpenNebula Project, OpenNebula Systems # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); you may # +# not use this file except in compliance with the License. You may obtain # +# a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +#--------------------------------------------------------------------------- # + +$: << File.dirname(__FILE__) +$: << File.join(File.dirname(__FILE__), "..") + +require 'vnmmad' +require 'vxlan_driver' + +template64 = ARGV[0] +deploy_id = ARGV[1] +hypervisor = nil +xpath_filter = VXLANDriver::XPATH_FILTER + +begin + filter_driver = VNMMAD::VNMDriver.filter_driver(template64, + deploy_id, + hypervisor, + xpath_filter) + filter_driver.activate(true) +rescue Exception => e + OpenNebula.log_error(e.message) + OpenNebula.log_error(e.backtrace) + exit 1 +end