diff --git a/install.sh b/install.sh index fc82f1377b..8c4f431fc5 100755 --- a/install.sh +++ b/install.sh @@ -230,6 +230,7 @@ VAR_DIRS="$VAR_LOCATION/remotes \ $VAR_LOCATION/remotes/vnm/ebtables \ $VAR_LOCATION/remotes/vnm/fw \ $VAR_LOCATION/remotes/vnm/ovswitch \ + $VAR_LOCATION/remotes/vnm/vmware \ $VAR_LOCATION/remotes/vmm/xen \ $VAR_LOCATION/remotes/vmm/vmware \ $VAR_LOCATION/remotes/hooks \ @@ -391,6 +392,7 @@ INSTALL_FILES=( NETWORK_EBTABLES_FILES:$VAR_LOCATION/remotes/vnm/ebtables NETWORK_FW_FILES:$VAR_LOCATION/remotes/vnm/fw NETWORK_OVSWITCH_FILES:$VAR_LOCATION/remotes/vnm/ovswitch + NETWORK_VMWARE_FILES:$VAR_LOCATION/remotes/vnm/vmware EXAMPLE_SHARE_FILES:$SHARE_LOCATION/examples INSTALL_NOVNC_SHARE_FILE:$SHARE_LOCATION INSTALL_GEMS_SHARE_FILE:$SHARE_LOCATION @@ -745,6 +747,11 @@ NETWORK_OVSWITCH_FILES="src/vnm_mad/remotes/ovswitch/clean \ src/vnm_mad/remotes/ovswitch/pre \ src/vnm_mad/remotes/ovswitch/OpenvSwitch.rb" +NETWORK_VMWARE_FILES="src/vnm_mad/remotes/vmware/clean \ + src/vnm_mad/remotes/vmware/post \ + src/vnm_mad/remotes/vmware/pre \ + src/vnm_mad/remotes/vmware/VMware.rb" + #------------------------------------------------------------------------------- # Transfer Manager commands, to be installed under $LIB_LOCATION/tm_commands @@ -1196,7 +1203,7 @@ SUNSTONE_PUBLIC_IMAGES_FILES="src/sunstone/public/images/ajax-loader.gif \ src/sunstone/public/images/green_bullet.png \ src/sunstone/public/images/vnc_off.png \ src/sunstone/public/images/vnc_on.png" - + SUNSTONE_PUBLIC_LOCALE_EN_US="\ src/sunstone/public/locale/en_US/en_US.js \ " @@ -1268,7 +1275,7 @@ OZONES_PUBLIC_JS_FILES="src/ozones/Server/public/js/ozones.js \ src/sunstone/public/js/sunstone.js \ src/sunstone/public/js/sunstone-util.js \ src/sunstone/public/js/locale.js" - + OZONES_PUBLIC_CSS_FILES="src/ozones/Server/public/css/application.css \ src/ozones/Server/public/css/layout.css \ src/ozones/Server/public/css/login.css" @@ -1322,7 +1329,7 @@ SELF_SERVICE_PUBLIC_CSS_FILES="src/cloud/occi/lib/ui/public/css/application.css src/cloud/occi/lib/ui/public/css/layout.css \ src/cloud/occi/lib/ui/public/css/login.css" -SELF_SERVICE_PUBLIC_CUSTOMIZE_FILES="src/cloud/occi/lib/ui/public/customize/custom.js" +SELF_SERVICE_PUBLIC_CUSTOMIZE_FILES="src/cloud/occi/lib/ui/public/customize/custom.js" SELF_SERVICE_PUBLIC_VENDOR_DATATABLES=$SUNSTONE_PUBLIC_VENDOR_DATATABLES diff --git a/src/cloud/occi/lib/ui/public/css/login.css b/src/cloud/occi/lib/ui/public/css/login.css index e086897b3f..c57dfe230e 100644 --- a/src/cloud/occi/lib/ui/public/css/login.css +++ b/src/cloud/occi/lib/ui/public/css/login.css @@ -45,7 +45,7 @@ body { } -div#logo_sunstone { +div#logo_selfservice { position: relative; height: 100px; width: 600px; diff --git a/src/cloud/occi/lib/ui/public/customize/custom.js b/src/cloud/occi/lib/ui/public/customize/custom.js index e26e24fecc..18d40c72fa 100644 --- a/src/cloud/occi/lib/ui/public/customize/custom.js +++ b/src/cloud/occi/lib/ui/public/customize/custom.js @@ -23,9 +23,9 @@ var $network_count = ''; -//Login logo 591x43px - not implemented +//Login logo 591x43px var logo_big = "images/opennebula-selfservice-big.png"; -//Top left logo 179x14px - not implemented +//Top left logo 179x14px var logo_small = "images/opennebula-selfservice-small.png"; diff --git a/src/cloud/occi/lib/ui/public/js/login.js b/src/cloud/occi/lib/ui/public/js/login.js index 13eff1f619..36b1e5b057 100644 --- a/src/cloud/occi/lib/ui/public/js/login.js +++ b/src/cloud/occi/lib/ui/public/js/login.js @@ -55,6 +55,8 @@ function authenticate(){ } $(document).ready(function(){ + $('div#logo_selfservice').css("background","url("+logo_big+") no-repeat center"); + $("#login_form").submit(function (){ authenticate(); return false; @@ -62,7 +64,7 @@ $(document).ready(function(){ //compact login elements according to screen height if (screen.height <= 600){ - $('div#logo_sunstone').css("top","15px"); + $('div#logo_selfservice').css("top","15px"); $('div#login').css("top","10px"); $('.error_message').css("top","10px"); }; diff --git a/src/cloud/occi/lib/ui/public/js/occi.js b/src/cloud/occi/lib/ui/public/js/occi.js index 4e28a5138b..632223d24b 100644 --- a/src/cloud/occi/lib/ui/public/js/occi.js +++ b/src/cloud/occi/lib/ui/public/js/occi.js @@ -235,7 +235,6 @@ var OCCI = { $.ajax({ url: resource.toLowerCase() + "/" + id, type: "DELETE", - dataType: "xml ONEjson", success: function(){ return callback ? callback(request) : null; }, diff --git a/src/cloud/occi/lib/ui/public/js/plugins/compute.js b/src/cloud/occi/lib/ui/public/js/plugins/compute.js index aeb9a3ad4a..09ee6c434e 100644 --- a/src/cloud/occi/lib/ui/public/js/plugins/compute.js +++ b/src/cloud/occi/lib/ui/public/js/plugins/compute.js @@ -93,9 +93,9 @@ var create_vm_tmpl ='
\ \ \
\ - \ + \ + \
\ \
'; @@ -666,19 +666,21 @@ function popUpCreateVMDialog(){ icons: { primary: "ui-icon-check" }, - text: false + text: true }); +/* $('#reset_vm',dialog).button({ icons: { primary: "ui-icon-scissors" }, - text: false + text: true }); +*/ $('.vm_close_dialog_link',dialog).button({ icons: { primary: "ui-icon-closethick" }, - text: false + text: true }); var net_select = makeSelectOptions(dataTable_vNetworks, @@ -706,13 +708,13 @@ function popUpCreateVMDialog(){ }); $('#network_box option,#disk_box option',dialog).click(function(){ - var clicked = $(this).attr("clicked"); + var clicked = $(this).attr('clicked'); if (clicked){//unbold, unmark - $(this).text($(this).text().replace(/\*/g,'')); + $(this).text($(this).text().replace(/✓/g,'')); $(this).removeAttr('clicked'); } else {//bold,mark - $(this).text("*"+$(this).text()+"*"); + $(this).text("✓"+$(this).text()); $(this).attr('clicked','clicked'); } return false; diff --git a/src/cloud/occi/lib/ui/public/js/plugins/configuration.js b/src/cloud/occi/lib/ui/public/js/plugins/configuration.js index 97c5803b1c..d3ea0b1cc8 100644 --- a/src/cloud/occi/lib/ui/public/js/plugins/configuration.js +++ b/src/cloud/occi/lib/ui/public/js/plugins/configuration.js @@ -59,4 +59,6 @@ $(document).ready(function(){ hideDialog(); }); + $('div#logo img').attr('src',logo_small); + }); \ No newline at end of file diff --git a/src/cloud/occi/lib/ui/public/js/plugins/network.js b/src/cloud/occi/lib/ui/public/js/plugins/network.js index 6668ec386d..d66d45d1f8 100644 --- a/src/cloud/occi/lib/ui/public/js/plugins/network.js +++ b/src/cloud/occi/lib/ui/public/js/plugins/network.js @@ -53,9 +53,9 @@ var create_vn_tmpl =
\ \
\ - \ + \ + \
\ \ \ @@ -342,19 +342,21 @@ function popUpCreateVnetDialog() { icons: { primary: "ui-icon-check" }, - text: false + text: true }); +/* $('#reset_vn',dialog).button({ icons: { primary: "ui-icon-scissors" }, text: false }); +*/ $('.vnet_close_dialog_link',dialog).button({ icons: { primary: "ui-icon-closethick" }, - text: false + text: true }); $('#create_vn_form_easy',dialog).submit(function(){ diff --git a/src/cloud/occi/lib/ui/public/js/plugins/storage.js b/src/cloud/occi/lib/ui/public/js/plugins/storage.js index 0348a9f255..7a4b3be704 100644 --- a/src/cloud/occi/lib/ui/public/js/plugins/storage.js +++ b/src/cloud/occi/lib/ui/public/js/plugins/storage.js @@ -73,11 +73,10 @@ var create_image_tmpl =
'+tr("Type of file system to be built. This can be any value understood by mkfs unix command.")+'
\ \
\ - \ -
\ +
\ +
\
\ - \ -
\ +
\
\ \
\ - \ + \ + \
\ \
\ @@ -414,19 +413,21 @@ function popUpCreateImageDialog(){ icons: { primary: "ui-icon-check" }, - text: false + text: true }); +/* $('#reset_image',dialog).button({ icons: { primary: "ui-icon-scissors" }, text: false }); +*/ $('.image_close_dialog_link',dialog).button({ icons: { primary: "ui-icon-closethick" }, - text: false + text: true }); setupTips(dialog); @@ -460,7 +461,7 @@ function popUpCreateImageDialog(){ border: "1px solid #AAAAAA", position: "relative", // bottom: "29px", - width: "210px", + width: "258px", // left: "133px", height: "15px", display: "inline-block", @@ -506,6 +507,7 @@ function popUpCreateImageDialog(){ }; $('#file-uploader input').removeAttr("style"); + $('#file-uploader input').attr('style','margin:0;width:256px!important'); var processCreateImageForm = function(){ var dialog = $create_image_dialog; diff --git a/src/cloud/occi/lib/ui/public/locale/en_US/en_US.js b/src/cloud/occi/lib/ui/public/locale/en_US/en_US.js index 1d13154a89..d36fd78cb4 100644 --- a/src/cloud/occi/lib/ui/public/locale/en_US/en_US.js +++ b/src/cloud/occi/lib/ui/public/locale/en_US/en_US.js @@ -13,6 +13,7 @@ locale={ "Canvas not supported.":"", "CD-ROM":"", "Changing language":"", + "Close":"", "Community":"", "Compute":"", "Compute resource":"", @@ -21,6 +22,7 @@ locale={ "Configuration":"", "Confirmation of action":"", "CPU":"", + "Create":"", "Create network":"", "Create new compute resource":"", "Create new network resource":"", @@ -98,6 +100,7 @@ locale={ "See more":"", "Select a template":"", "Select disk":"", + "Select image to upload":"", "Self-Service UI Configuration":"", "Shutdown":"", "Sign out":"", @@ -132,8 +135,6 @@ locale={ "Unpublish":"", "Update":"", "Update template":"", - "Upload image":"", - "Upload progress":"", "Useful links":"", "Virtual Machine information":"", "virtual machines":"", diff --git a/src/cloud/occi/lib/ui/public/locale/es_ES/es_ES.js b/src/cloud/occi/lib/ui/public/locale/es_ES/es_ES.js index 96d30e7769..49d91652f2 100644 --- a/src/cloud/occi/lib/ui/public/locale/es_ES/es_ES.js +++ b/src/cloud/occi/lib/ui/public/locale/es_ES/es_ES.js @@ -1,4 +1,4 @@ -//Translated by +//Translated by Hector Sanjuan lang="es_ES" datatable_lang="es_datatable.txt" locale={ @@ -13,6 +13,7 @@ locale={ "Canvas not supported.":"Canvas no soportado", "CD-ROM":"CD-ROM", "Changing language":"Cambiando el lenguaje", + "Close":"Cerrar", "Community":"Comunidad", "Compute":"Máquinas Virtuales", "Compute resource":"máquina virtual", @@ -21,6 +22,7 @@ locale={ "Configuration":"Configuración", "Confirmation of action":"Confirmar operación", "CPU":"CPU", + "Create":"Crear", "Create network":"Crear red", "Create new compute resource":"Crear nueva máquina virtual", "Create new network resource":"Crear nueva red", @@ -89,7 +91,7 @@ locale={ "Please select":"Por favor escoja", "Previous action":"Acción anterior", "Public":"Público", - "Public scope of the image":"", + "Public scope of the image":"Imagen pública", "Publish":"Publicar", "Refresh list":"Refrescar lista", "Resume":"Reanudar", @@ -98,6 +100,7 @@ locale={ "See more":"Ver más", "Select a template":"Seleccione una plantilla", "Select disk":"Seleccione un disco", + "Select image to upload":"Seleccione una imagen para subir", "Self-Service UI Configuration":"Configuración de la interfaz Self-Service", "Shutdown":"Apagar", "Sign out":"Desconectar", @@ -132,8 +135,6 @@ locale={ "Unpublish":"Despublicar", "Update":"Actualizar", "Update template":"Actualizar plantilla", - "Upload image":"Subir imagen", - "Upload progress":"Progreso se subida", "Useful links":"Enlances útiles", "Virtual Machine information":"Información de máquina virtual", "virtual machines":"máquinas virtuales", diff --git a/src/cloud/occi/lib/ui/public/locale/generate_translation_template.rb b/src/cloud/occi/lib/ui/public/locale/generate_translation_template.rb index e6adde7429..b3719bd4fa 100755 --- a/src/cloud/occi/lib/ui/public/locale/generate_translation_template.rb +++ b/src/cloud/occi/lib/ui/public/locale/generate_translation_template.rb @@ -17,7 +17,7 @@ # limitations under the License. # #--------------------------------------------------------------------------- # -tr_strings = `grep -h -o -R -e 'tr("[[:print:]]*")' ../js/* ../customize/* | cut -d'"' -f 2 | sort -u` +tr_strings = `grep -h -o -R -e 'tr("[[:print:]]*")' ../js/* ../customize/* ../../../../../../sunstone/public/js/sunstone.js ../../../../../../sunstone/public/js/sunstone-util.js | cut -d'"' -f 2 | sort -u` puts "//Translated by" puts 'lang="en_US"' diff --git a/src/cloud/occi/lib/ui/templates/login.html b/src/cloud/occi/lib/ui/templates/login.html index a0bf676c1a..82b80c0785 100644 --- a/src/cloud/occi/lib/ui/templates/login.html +++ b/src/cloud/occi/lib/ui/templates/login.html @@ -9,7 +9,9 @@ + + @@ -23,7 +25,7 @@
-
+
diff --git a/src/vmm/LibVirtDriverVMware.cc b/src/vmm/LibVirtDriverVMware.cc index b4662e8d41..ad415ee4bf 100644 --- a/src/vmm/LibVirtDriverVMware.cc +++ b/src/vmm/LibVirtDriverVMware.cc @@ -52,6 +52,7 @@ int LibVirtDriver::deployment_description_vmware( const VectorAttribute * nic; + string network_id = ""; string mac = ""; string bridge = ""; string script = ""; @@ -163,7 +164,7 @@ int LibVirtDriver::deployment_description_vmware( // ------------------------------------------------------------------------ file << "\t" << endl; - + get_default("DISK","DRIVER",default_driver); num = vm->get_template_attribute("DISK",attrs); @@ -221,7 +222,7 @@ int LibVirtDriver::deployment_description_vmware( { file << "\t\t" << endl; file << "\t\t\tget_oid() - << "/images/disk." << i << ".iso'/>" << endl; + << "/images/disk." << i << ".iso'/>" << endl; } else { @@ -249,8 +250,8 @@ int LibVirtDriver::deployment_description_vmware( { if (!default_driver.empty()) { - file << "\t\t\t" << endl; + file << "\t\t\t" << endl; } } @@ -306,21 +307,17 @@ int LibVirtDriver::deployment_description_vmware( continue; } - bridge = nic->vector_value("BRIDGE"); - mac = nic->vector_value("MAC"); - target = nic->vector_value("TARGET"); - script = nic->vector_value("SCRIPT"); - model = nic->vector_value("MODEL"); + network_id = nic->vector_value("NETWORK_ID"); + mac = nic->vector_value("MAC"); + target = nic->vector_value("TARGET"); + script = nic->vector_value("SCRIPT"); + model = nic->vector_value("MODEL"); - if ( bridge.empty() ) - { - file << "\t\t" << endl; - } - else - { - file << "\t\t" << endl; - file << "\t\t\t" << endl; - } + bridge = "one-pg-"; + bridge.append(network_id); + + file << "\t\t" << endl; + file << "\t\t\t" << endl; if( !mac.empty() ) { diff --git a/src/vnm_mad/remotes/OpenNebulaNetwork.rb b/src/vnm_mad/remotes/OpenNebulaNetwork.rb index c4ed9f8a23..47b3a2c57c 100644 --- a/src/vnm_mad/remotes/OpenNebulaNetwork.rb +++ b/src/vnm_mad/remotes/OpenNebulaNetwork.rb @@ -24,6 +24,7 @@ require 'OpenNebulaNic' require 'base64' require 'scripts_common' +require 'CommandManager' include OpenNebula CONF = { @@ -84,7 +85,7 @@ class VM def [](element) if @vm_root val = @vm_root.elements[element] - if val.text + if !val.nil? and val.text return val.text end end @@ -106,7 +107,7 @@ class OpenNebulaNetwork else @hypervisor = hypervisor end - + @vm = VM.new(REXML::Document.new(vm_tpl).root, xpath_filter, deploy_id, @hypervisor) end diff --git a/src/vnm_mad/remotes/OpenNebulaNic.rb b/src/vnm_mad/remotes/OpenNebulaNic.rb index 176d41246e..2276980611 100644 --- a/src/vnm_mad/remotes/OpenNebulaNic.rb +++ b/src/vnm_mad/remotes/OpenNebulaNic.rb @@ -22,6 +22,8 @@ class Nics < Array @nicClass = NicKVM when "xen" @nicClass = NicXen + when "vmware" + @nicClass = NicVMware end end @@ -30,7 +32,6 @@ class Nics < Array end end - # A NIC using KVM. This class implements functions to get the physical interface # that the NIC is using class NicKVM < Hash @@ -114,3 +115,18 @@ class NicXen < Hash self end end + +# A NIC using VMware. This class implements functions to get the physical interface +# that the NIC is using +class NicVMware < Hash + def initialize + super(nil) + end + + def get_info(vm) + end + + def get_tap(vm) + self + end +end diff --git a/src/vnm_mad/remotes/vmware/VMware.rb b/src/vnm_mad/remotes/vmware/VMware.rb new file mode 100644 index 0000000000..e03cda8320 --- /dev/null +++ b/src/vnm_mad/remotes/vmware/VMware.rb @@ -0,0 +1,123 @@ +# -------------------------------------------------------------------------- # +# Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) # +# # +# 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. # +#--------------------------------------------------------------------------- # + +# -------------------------------------------------------------------------# +# Set up the environment for the driver # +# -------------------------------------------------------------------------# +ONE_LOCATION = ENV["ONE_LOCATION"] + +if !ONE_LOCATION + ETC_LOCATION = "/etc/one/" +else + ETC_LOCATION = ONE_LOCATION + "/etc/" +end + +CONF_FILE = ETC_LOCATION + "/vmwarerc" + +require 'yaml' +require 'OpenNebulaNetwork' + +class OpenNebulaVMware < OpenNebulaNetwork + XPATH_FILTER = "TEMPLATE/NIC" + VCLI_PREFIX = "/usr/bin/vicfg" + + def initialize(vm, deploy_id = nil, hypervisor = nil) + super(vm,XPATH_FILTER,deploy_id,hypervisor) + + @config = YAML::load(File.read(CONF_FILE)) + + set_conn_options + end + + def set_conn_options + username = @config[:username] + password = @config[:password] + server = @vm['HISTORY_RECORDS/HISTORY/HOSTNAME'] + + @conn_options = "--username=#{username} " << + "--password=#{password} " << + "--server=#{server}" + end + + def activate + vm_id = @vm['ID'] + hostname = @vm['HISTORY_RECORDS/HISTORY/HOSTNAME'] + process do |nic| + switch = nic[:bridge] + network_id = nic[:network_id] + pg = "one-pg-#{network_id}" + + if nic[:vlan] == "YES" + if nic[:vlan_id] + vlan = nic[:vlan_id] + else + vlan = CONF[:start_vlan] + nic[:network_id].to_i + end + else + vlan = nil + end + + add_pg(pg, switch, vlan) if !check_pg(pg, switch) + end + + return 0 + end + + + def vcli(command, params) + cmd = "#{VCLI_PREFIX}-#{command.to_s} #{@conn_options} #{params}" + end + + def vswitch(params) + vcli(:vswitch, params) + end + + def check_pg(pg, switch) + cmd = vcli(:vswitch, "--check-pg #{pg} #{switch}") + rc, output = do_action(cmd) + output.strip! + if output.match(/^\d+$/) + return output != "0" + else + OpenNebula.log_error("Unexpected output for #{cmd}:\n#{output}") + return false + end + end + + def add_pg(pg, switch, vlan=nil) + add_pg_cmd = vcli(:vswitch, "--add-pg #{pg} #{switch}") + do_action(add_pg_cmd) + + if vlan + set_vlan_cmd = vcli(:vswitch, "--vlan #{vlan} --pg #{pg} #{switch}") + do_action(set_vlan_cmd) + end + end + + #Performs an action using vCLI + def do_action(cmd) + rc = LocalCommand.run(cmd) + + if rc.code == 0 + OpenNebula.log("Executed \"#{cmd}\".") + return [true, rc.stdout] + else + err = "Error executing: #{cmd} err: #{rc.stderr} out: #{rc.stdout}" + OpenNebula.log_error(err) + return [false, rc.code] + end + end +end diff --git a/src/vnm_mad/remotes/vmware/clean b/src/vnm_mad/remotes/vmware/clean new file mode 100755 index 0000000000..4fb0677a4a --- /dev/null +++ b/src/vnm_mad/remotes/vmware/clean @@ -0,0 +1,19 @@ +#!/bin/sh + +# -------------------------------------------------------------------------- # +# Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) # +# # +# 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. # +#--------------------------------------------------------------------------- # + +exit 0 diff --git a/src/vnm_mad/remotes/vmware/post b/src/vnm_mad/remotes/vmware/post new file mode 100755 index 0000000000..4fb0677a4a --- /dev/null +++ b/src/vnm_mad/remotes/vmware/post @@ -0,0 +1,19 @@ +#!/bin/sh + +# -------------------------------------------------------------------------- # +# Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) # +# # +# 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. # +#--------------------------------------------------------------------------- # + +exit 0 diff --git a/src/vnm_mad/remotes/vmware/pre b/src/vnm_mad/remotes/vmware/pre new file mode 100755 index 0000000000..47849c393a --- /dev/null +++ b/src/vnm_mad/remotes/vmware/pre @@ -0,0 +1,30 @@ +#!/usr/bin/env ruby + +# -------------------------------------------------------------------------- # +# Copyright 2002-2011, OpenNebula Project Leads (OpenNebula.org) # +# # +# 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. # +#--------------------------------------------------------------------------- # +# $stdout = $stderr + +$: << File.dirname(__FILE__) +$: << File.join(File.dirname(__FILE__), "..") + +require 'VMware' + +deploy_id = nil +hypervisor = "vmware" +vm_64 = ARGV[0] + +vmware = OpenNebulaVMware.from_base64(vm_64, deploy_id, hypervisor) +exit vmware.activate