diff --git a/include/RequestManagerAllocate.h b/include/RequestManagerAllocate.h
index e2561eb4d9..c9921b39d0 100644
--- a/include/RequestManagerAllocate.h
+++ b/include/RequestManagerAllocate.h
@@ -210,7 +210,7 @@ public:
HostAllocate():
RequestManagerAllocate("HostAllocate",
"Allocates a new host",
- "A:sssss",
+ "A:ssssss",
false)
{
Nebula& nd = Nebula::instance();
diff --git a/install.sh b/install.sh
index 2db3e5ff92..d623fa7a57 100755
--- a/install.sh
+++ b/install.sh
@@ -967,6 +967,7 @@ OCCI_ETC_TEMPLATE_FILES="src/cloud/occi/etc/templates/common.erb \
src/cloud/occi/etc/templates/custom.erb \
src/cloud/occi/etc/templates/small.erb \
src/cloud/occi/etc/templates/medium.erb \
+ src/cloud/occi/etc/templates/network.erb \
src/cloud/occi/etc/templates/large.erb"
#-----------------------------------------------------------------------------
diff --git a/share/doc/xsd/README.txt b/share/doc/xsd/README.txt
new file mode 100644
index 0000000000..00d6a90185
--- /dev/null
+++ b/share/doc/xsd/README.txt
@@ -0,0 +1,9 @@
+These XML Schemas define the XMLs returned by OpenNebula's XML-RPC API.
+
+The included XML samples are not actual responses from OpenNebula, as it does
+not include the headers (namespace, schema location).
+
+
+To learn more, please read the API reference documentation at
+http://opennebula.org/documentation:documentation:api
+
diff --git a/share/doc/xsd/group.xsd b/share/doc/xsd/group.xsd
new file mode 100644
index 0000000000..eb36432fff
--- /dev/null
+++ b/share/doc/xsd/group.xsd
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/share/doc/xsd/group_pool.xsd b/share/doc/xsd/group_pool.xsd
new file mode 100644
index 0000000000..c8dc69c06b
--- /dev/null
+++ b/share/doc/xsd/group_pool.xsd
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/host.xsd b/share/doc/xsd/host.xsd
new file mode 100644
index 0000000000..58fa4d8bbe
--- /dev/null
+++ b/share/doc/xsd/host.xsd
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/share/doc/xsd/host_pool.xsd b/share/doc/xsd/host_pool.xsd
new file mode 100644
index 0000000000..5d797d3cbb
--- /dev/null
+++ b/share/doc/xsd/host_pool.xsd
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/share/doc/xsd/image.xsd b/share/doc/xsd/image.xsd
new file mode 100644
index 0000000000..207cee1bd0
--- /dev/null
+++ b/share/doc/xsd/image.xsd
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/share/doc/xsd/image_pool.xsd b/share/doc/xsd/image_pool.xsd
new file mode 100644
index 0000000000..6e39f45267
--- /dev/null
+++ b/share/doc/xsd/image_pool.xsd
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/share/doc/xsd/samples/group/1.xml b/share/doc/xsd/samples/group/1.xml
new file mode 100644
index 0000000000..35813b2430
--- /dev/null
+++ b/share/doc/xsd/samples/group/1.xml
@@ -0,0 +1,12 @@
+
+ 1
+ users
+
+ 2
+ 3
+ 4
+ 5
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/group/2.xml b/share/doc/xsd/samples/group/2.xml
new file mode 100644
index 0000000000..83ec0ed02b
--- /dev/null
+++ b/share/doc/xsd/samples/group/2.xml
@@ -0,0 +1,7 @@
+
+ 100
+ new
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/group_pool/1.xml b/share/doc/xsd/samples/group_pool/1.xml
new file mode 100644
index 0000000000..4c99b3289c
--- /dev/null
+++ b/share/doc/xsd/samples/group_pool/1.xml
@@ -0,0 +1,37 @@
+
+
+ 0
+ oneadmin
+
+ 0
+ 1
+
+
+
+ 1
+ users
+
+ 2
+ 3
+ 4
+ 5
+
+
+
+ 100
+ new
+
+
+
+ 101
+ test
+
+
+
+ 102
+ abc
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/host/1.xml b/share/doc/xsd/samples/host/1.xml
new file mode 100644
index 0000000000..400cdf25f7
--- /dev/null
+++ b/share/doc/xsd/samples/host/1.xml
@@ -0,0 +1,27 @@
+
+ 0
+ localhost
+ 3
+ im_dummy
+ vmm_dummy
+ fw
+ tm_shared
+ 0
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
diff --git a/share/doc/xsd/samples/host/2.xml b/share/doc/xsd/samples/host/2.xml
new file mode 100644
index 0000000000..bd9e6c6de0
--- /dev/null
+++ b/share/doc/xsd/samples/host/2.xml
@@ -0,0 +1,27 @@
+
+ 0
+ localhost
+ 3
+ im_dummy
+ vmm_dummy
+ fw
+ tm_shared
+ 0
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/host/3.xml b/share/doc/xsd/samples/host/3.xml
new file mode 100644
index 0000000000..c8585496a2
--- /dev/null
+++ b/share/doc/xsd/samples/host/3.xml
@@ -0,0 +1,38 @@
+
+ 0
+ localhost
+ 2
+ im_dummy
+ vmm_dummy
+ fw
+ tm_shared
+ 1324039779
+
+ 0
+ 0
+ 0
+ 0
+ 16777216
+ 800
+ 0
+ 16777216
+ 800
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/host_pool/1.xml b/share/doc/xsd/samples/host_pool/1.xml
new file mode 100644
index 0000000000..066566a08f
--- /dev/null
+++ b/share/doc/xsd/samples/host_pool/1.xml
@@ -0,0 +1,41 @@
+
+
+ 0
+ localhost
+ 2
+ im_dummy
+ vmm_dummy
+ fw
+ tm_shared
+ 1324048185
+
+ 0
+ 0
+ 0
+ 0
+ 16777216
+ 800
+ 0
+ 16777216
+ 800
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/host_pool/2.xml b/share/doc/xsd/samples/host_pool/2.xml
new file mode 100644
index 0000000000..b946372d3e
--- /dev/null
+++ b/share/doc/xsd/samples/host_pool/2.xml
@@ -0,0 +1,67 @@
+
+
+ 0
+ localhost
+ 2
+ im_dummy
+ vmm_dummy
+ fw
+ tm_shared
+ 1324048436
+
+ 0
+ 0
+ 0
+ 0
+ 16777216
+ 800
+ 0
+ 16777216
+ 800
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1
+ vm
+ 0
+ im_dummy
+ vmm_dummy
+ fw
+ tm_shared
+ 0
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/host_pool/3.xml b/share/doc/xsd/samples/host_pool/3.xml
new file mode 100644
index 0000000000..dbfde4e3db
--- /dev/null
+++ b/share/doc/xsd/samples/host_pool/3.xml
@@ -0,0 +1,3 @@
+
diff --git a/share/doc/xsd/samples/image/1.xml b/share/doc/xsd/samples/image/1.xml
new file mode 100644
index 0000000000..5b05a09c6d
--- /dev/null
+++ b/share/doc/xsd/samples/image/1.xml
@@ -0,0 +1,23 @@
+
+ 0
+ 0
+ 0
+ oneadmin
+ oneadmin
+ Ubuntu Desktop
+ 0
+ 1
+ 0
+ 1324047583
+ /var/lib/one/images/590815350477644ac13f7800f6a6789c
+ /boot/initrd.img-2.6.32-34-generic
+
+ 8
+ 1
+ 0
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/image/2.xml b/share/doc/xsd/samples/image/2.xml
new file mode 100644
index 0000000000..944fd39108
--- /dev/null
+++ b/share/doc/xsd/samples/image/2.xml
@@ -0,0 +1,22 @@
+
+ 1
+ 0
+ 0
+ oneadmin
+ oneadmin
+ Experiment results
+ 2
+ 0
+ 0
+ 1324048803
+ /var/lib/one/images/5a785bd223a970ec3536733514f2c3db
+
+ ext3
+ 30
+ 1
+ 0
+
+
+
+
diff --git a/share/doc/xsd/samples/image_pool/1.xml b/share/doc/xsd/samples/image_pool/1.xml
new file mode 100644
index 0000000000..d3a901b549
--- /dev/null
+++ b/share/doc/xsd/samples/image_pool/1.xml
@@ -0,0 +1,3 @@
+
diff --git a/share/doc/xsd/samples/image_pool/2.xml b/share/doc/xsd/samples/image_pool/2.xml
new file mode 100644
index 0000000000..6975228bea
--- /dev/null
+++ b/share/doc/xsd/samples/image_pool/2.xml
@@ -0,0 +1,47 @@
+
+
+ 0
+ 0
+ 0
+ oneadmin
+ oneadmin
+ Ubuntu Desktop
+ 0
+ 1
+ 0
+ 1324047583
+ /var/lib/one/images/590815350477644ac13f7800f6a6789c
+ /boot/initrd.img-2.6.32-34-generic
+
+ 8
+ 1
+ 0
+
+
+
+
+
+
+ 1
+ 0
+ 0
+ oneadmin
+ oneadmin
+ Experiment results
+ 2
+ 0
+ 0
+ 1324048803
+ /var/lib/one/images/5a785bd223a970ec3536733514f2c3db
+
+ ext3
+ 30
+ 1
+ 0
+
+
+
+
+
diff --git a/share/doc/xsd/samples/image_pool/3.xml b/share/doc/xsd/samples/image_pool/3.xml
new file mode 100644
index 0000000000..01fb4ba810
--- /dev/null
+++ b/share/doc/xsd/samples/image_pool/3.xml
@@ -0,0 +1,25 @@
+
+
+ 1
+ 0
+ 0
+ oneadmin
+ oneadmin
+ Experiment results
+ 2
+ 0
+ 0
+ 1324048803
+ /var/lib/one/images/5a785bd223a970ec3536733514f2c3db
+
+ ext3
+ 30
+ 1
+ 0
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/template/1.xml b/share/doc/xsd/samples/template/1.xml
new file mode 100644
index 0000000000..b580fb7d30
--- /dev/null
+++ b/share/doc/xsd/samples/template/1.xml
@@ -0,0 +1,16 @@
+
+ 0
+ 0
+ 0
+ oneadmin
+ oneadmin
+ vm-example
+ 0
+ 1324050180
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/template/2.xml b/share/doc/xsd/samples/template/2.xml
new file mode 100644
index 0000000000..48d50ce786
--- /dev/null
+++ b/share/doc/xsd/samples/template/2.xml
@@ -0,0 +1,16 @@
+
+ 0
+ 0
+ 0
+ oneadmin
+ oneadmin
+ vm-example
+ 0
+ 1324050180
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/template/3.xml b/share/doc/xsd/samples/template/3.xml
new file mode 100644
index 0000000000..7ef2ba5e1b
--- /dev/null
+++ b/share/doc/xsd/samples/template/3.xml
@@ -0,0 +1,13 @@
+
+ 0
+ 0
+ 0
+ oneadmin
+ oneadmin
+ vm-example
+ 0
+ 1324050180
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/template_pool/1.xml b/share/doc/xsd/samples/template_pool/1.xml
new file mode 100644
index 0000000000..70a1e1f8e4
--- /dev/null
+++ b/share/doc/xsd/samples/template_pool/1.xml
@@ -0,0 +1,35 @@
+
+
+ 0
+ 0
+ 0
+ oneadmin
+ oneadmin
+ vm-example
+ 0
+ 1324050180
+
+
+
+
+
+
+ 1
+ 0
+ 0
+ oneadmin
+ oneadmin
+ ONE
+ 0
+ 1324050461
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/template_pool/2.xml b/share/doc/xsd/samples/template_pool/2.xml
new file mode 100644
index 0000000000..32f50bfe47
--- /dev/null
+++ b/share/doc/xsd/samples/template_pool/2.xml
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/user/1.xml b/share/doc/xsd/samples/user/1.xml
new file mode 100644
index 0000000000..84944f9291
--- /dev/null
+++ b/share/doc/xsd/samples/user/1.xml
@@ -0,0 +1,12 @@
+
+ 1
+ 0
+ oneadmin
+ serveradmin
+ f72281eda1b97393f46041288b0baea528483b51
+ server_cipher
+ 1
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/user/2.xml b/share/doc/xsd/samples/user/2.xml
new file mode 100644
index 0000000000..526c0f0edb
--- /dev/null
+++ b/share/doc/xsd/samples/user/2.xml
@@ -0,0 +1,12 @@
+
+ 2
+ 1
+ users
+ abc
+ a9993e364706816aba3e25717850c26c9cd0d89d
+ core
+ 1
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/user/3.xml b/share/doc/xsd/samples/user/3.xml
new file mode 100644
index 0000000000..bdaf7f43e3
--- /dev/null
+++ b/share/doc/xsd/samples/user/3.xml
@@ -0,0 +1,21 @@
+
+ 3
+ 1
+ users
+ 1234
+ 7110eda4d09e062aa5e4a390b0a572ac0d2c0220
+ core
+ 1
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/user_pool/1.xml b/share/doc/xsd/samples/user_pool/1.xml
new file mode 100644
index 0000000000..86c5335373
--- /dev/null
+++ b/share/doc/xsd/samples/user_pool/1.xml
@@ -0,0 +1,53 @@
+
+
+ 0
+ 0
+ oneadmin
+ oneadmin
+ f72281eda1b97393f46041288b0baea528483b51
+ core
+ 1
+
+
+
+ 1
+ 0
+ oneadmin
+ serveradmin
+ f72281eda1b97393f46041288b0baea528483b51
+ server_cipher
+ 1
+
+
+
+ 2
+ 1
+ users
+ abc
+ a9993e364706816aba3e25717850c26c9cd0d89d
+ core
+ 1
+
+
+
+ 3
+ 1
+ users
+ 1234
+ 7110eda4d09e062aa5e4a390b0a572ac0d2c0220
+ core
+ 1
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/vm/1.xml b/share/doc/xsd/samples/vm/1.xml
new file mode 100644
index 0000000000..54b668d48f
--- /dev/null
+++ b/share/doc/xsd/samples/vm/1.xml
@@ -0,0 +1,26 @@
+
+ 0
+ 0
+ 0
+ oneadmin
+ oneadmin
+ one-0
+ 0
+ 1
+ 0
+ 1324050700
+ 0
+
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/vm/2.xml b/share/doc/xsd/samples/vm/2.xml
new file mode 100644
index 0000000000..1111618103
--- /dev/null
+++ b/share/doc/xsd/samples/vm/2.xml
@@ -0,0 +1,81 @@
+
+ 0
+ 0
+ 0
+ oneadmin
+ oneadmin
+ one-0
+ 1324050881
+ 3
+ 3
+ 1324050700
+ 0
+ vm:one-0:dummy
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+ 0
+ vm
+ /var/lib/one/
+ 1
+ 1324050881
+ 1324050891
+ vmm_dummy
+ fw
+ tm_shared
+ 1324050881
+ 1324050881
+ 1324050881
+ 1324050891
+ 0
+ 0
+ 3
+
+
+ 1
+ localhost
+ /var/lib/one/
+ 0
+ 1324050891
+ 1324050899
+ vmm_dummy
+ fw
+ tm_shared
+ 1324050891
+ 1324050892
+ 1324050892
+ 1324050899
+ 0
+ 0
+ 3
+
+
+ 2
+ localhost
+ /var/lib/one/
+ 0
+ 1324050899
+ 0
+ vmm_dummy
+ fw
+ tm_shared
+ 0
+ 0
+ 1324050899
+ 0
+ 0
+ 0
+ 0
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/vm/3.xml b/share/doc/xsd/samples/vm/3.xml
new file mode 100644
index 0000000000..99baa18bb8
--- /dev/null
+++ b/share/doc/xsd/samples/vm/3.xml
@@ -0,0 +1,81 @@
+
+ 3
+ 0
+ 0
+ oneadmin
+ oneadmin
+ one-3
+ 1324052447
+ 6
+ 0
+ 1324052427
+ 1324052465
+ localhost:one-3:dummy
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+ 0
+ localhost
+ /var/lib/one/
+ 0
+ 1324052447
+ 1324052452
+ vmm_dummy
+ fw
+ tm_shared
+ 1324052447
+ 1324052447
+ 1324052447
+ 1324052452
+ 0
+ 0
+ 3
+
+
+ 1
+ vm
+ /var/lib/one/
+ 1
+ 1324052452
+ 1324052456
+ vmm_dummy
+ fw
+ tm_shared
+ 1324052452
+ 1324052452
+ 1324052452
+ 1324052456
+ 0
+ 0
+ 3
+
+
+ 2
+ localhost
+ /var/lib/one/
+ 0
+ 1324052456
+ 1324052465
+ vmm_dummy
+ fw
+ tm_shared
+ 1324052456
+ 1324052456
+ 1324052456
+ 1324052465
+ 1324052465
+ 1324052465
+ 4
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/vm_pool/1.xml b/share/doc/xsd/samples/vm_pool/1.xml
new file mode 100644
index 0000000000..c3772a666d
--- /dev/null
+++ b/share/doc/xsd/samples/vm_pool/1.xml
@@ -0,0 +1,161 @@
+
+
+ 0
+ 0
+ 0
+ oneadmin
+ oneadmin
+ one-0
+ 1324052091
+ 3
+ 3
+ 1324050700
+ 0
+ vm:one-0:dummy
+ 0
+ 0
+ 12345
+ 0
+
+
+
+
+
+
+
+ 2
+ localhost
+ /var/lib/one/
+ 0
+ 1324050899
+ 0
+ vmm_dummy
+ fw
+ tm_shared
+ 0
+ 0
+ 1324050899
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+ 1
+ 0
+ 0
+ oneadmin
+ oneadmin
+ one-1
+ 0
+ 1
+ 0
+ 1324052403
+ 0
+
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 2
+ 0
+ 0
+ oneadmin
+ oneadmin
+ one-2
+ 1324052436
+ 3
+ 3
+ 1324052411
+ 0
+ vm:one-2:dummy
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+ 0
+ vm
+ /var/lib/one/
+ 1
+ 1324052436
+ 0
+ vmm_dummy
+ fw
+ tm_shared
+ 1324052436
+ 1324052436
+ 1324052436
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+ 4
+ 0
+ 0
+ oneadmin
+ oneadmin
+ one-4
+ 1324052488
+ 7
+ 0
+ 1324052484
+ 1324052510
+ localhost:one-4:dummy
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+
+
+
+ 2
+ vm
+ /var/lib/one/
+ 1
+ 1324052502
+ 1324052510
+ vmm_dummy
+ fw
+ tm_shared
+ 1324052502
+ 1324052502
+ 1324052502
+ 1324052510
+ 1324052510
+ 1324052510
+ 1
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/vm_pool/2.xml b/share/doc/xsd/samples/vm_pool/2.xml
new file mode 100644
index 0000000000..2c7d359203
--- /dev/null
+++ b/share/doc/xsd/samples/vm_pool/2.xml
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/vnet/1.xml b/share/doc/xsd/samples/vnet/1.xml
new file mode 100644
index 0000000000..58c2f01c61
--- /dev/null
+++ b/share/doc/xsd/samples/vnet/1.xml
@@ -0,0 +1,48 @@
+
+ 0
+ 0
+ 0
+ oneadmin
+ oneadmin
+ Blue LAN
+ 1
+ vbr1
+ 0
+
+
+ 0
+ 0
+
+
+
+
+
+
+
+ 130.10.0.1
+ 02:00:82:0a:00:01
+ 0
+ -1
+
+
+ 130.10.0.2
+ 50:20:20:20:20:21
+ 0
+ -1
+
+
+ 130.10.0.3
+ 02:00:82:0a:00:03
+ 0
+ -1
+
+
+ 130.10.0.4
+ 02:00:82:0a:00:04
+ 0
+ -1
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/vnet/2.xml b/share/doc/xsd/samples/vnet/2.xml
new file mode 100644
index 0000000000..7dd12dd226
--- /dev/null
+++ b/share/doc/xsd/samples/vnet/2.xml
@@ -0,0 +1,26 @@
+
+ 1
+ 0
+ 0
+ oneadmin
+ oneadmin
+ R
+ 0
+ vbr0
+ 0
+
+
+
+ 10.10.10.1
+ 10.10.10.254
+
+ 0
+ 0
+
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/vnet/3.xml b/share/doc/xsd/samples/vnet/3.xml
new file mode 100644
index 0000000000..65979e9c7e
--- /dev/null
+++ b/share/doc/xsd/samples/vnet/3.xml
@@ -0,0 +1,23 @@
+
+ 3
+ 0
+ 0
+ oneadmin
+ oneadmin
+ Empty
+ 1
+ vbr1
+ 1
+ eth0
+ 34
+ 0
+ 0
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/samples/vnet_pool/1.xml b/share/doc/xsd/samples/vnet_pool/1.xml
new file mode 100644
index 0000000000..4a98dc0af0
--- /dev/null
+++ b/share/doc/xsd/samples/vnet_pool/1.xml
@@ -0,0 +1,3 @@
+
diff --git a/share/doc/xsd/samples/vnet_pool/2.xml b/share/doc/xsd/samples/vnet_pool/2.xml
new file mode 100644
index 0000000000..d489eea01b
--- /dev/null
+++ b/share/doc/xsd/samples/vnet_pool/2.xml
@@ -0,0 +1,63 @@
+
+
+ 0
+ 0
+ 0
+ oneadmin
+ oneadmin
+ Blue LAN
+ 1
+ vbr1
+ 0
+
+
+ 0
+ 0
+
+
+
+ 1
+ 0
+ 0
+ oneadmin
+ oneadmin
+ R
+ 0
+ vbr0
+ 0
+
+
+
+ 10.10.10.1
+ 10.10.10.254
+
+ 0
+ 0
+
+
+
+
+
+
+ 3
+ 0
+ 0
+ oneadmin
+ oneadmin
+ Empty
+ 1
+ vbr1
+ 1
+ eth0
+ 34
+ 0
+ 0
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/template.xsd b/share/doc/xsd/template.xsd
new file mode 100644
index 0000000000..6fb9523e72
--- /dev/null
+++ b/share/doc/xsd/template.xsd
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/share/doc/xsd/template_pool.xsd b/share/doc/xsd/template_pool.xsd
new file mode 100644
index 0000000000..cb377ea2c9
--- /dev/null
+++ b/share/doc/xsd/template_pool.xsd
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/share/doc/xsd/test.sh b/share/doc/xsd/test.sh
new file mode 100755
index 0000000000..0f5e0e24bd
--- /dev/null
+++ b/share/doc/xsd/test.sh
@@ -0,0 +1,5 @@
+
+for i in group_pool group host_pool host image_pool image template_pool template user_pool user vm_pool vm vnet_pool vnet
+do
+ xmllint --noout --schema $i.xsd samples/$i/*
+done
\ No newline at end of file
diff --git a/share/doc/xsd/user.xsd b/share/doc/xsd/user.xsd
new file mode 100644
index 0000000000..5add6f1685
--- /dev/null
+++ b/share/doc/xsd/user.xsd
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/share/doc/xsd/user_pool.xsd b/share/doc/xsd/user_pool.xsd
new file mode 100644
index 0000000000..96657f384d
--- /dev/null
+++ b/share/doc/xsd/user_pool.xsd
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/share/doc/xsd/vm.xsd b/share/doc/xsd/vm.xsd
new file mode 100644
index 0000000000..57ea8dbf79
--- /dev/null
+++ b/share/doc/xsd/vm.xsd
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/share/doc/xsd/vm_pool.xsd b/share/doc/xsd/vm_pool.xsd
new file mode 100644
index 0000000000..ce73df84ab
--- /dev/null
+++ b/share/doc/xsd/vm_pool.xsd
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/share/doc/xsd/vnet.xsd b/share/doc/xsd/vnet.xsd
new file mode 100644
index 0000000000..391a01d3fd
--- /dev/null
+++ b/share/doc/xsd/vnet.xsd
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/share/doc/xsd/vnet_pool.xsd b/share/doc/xsd/vnet_pool.xsd
new file mode 100644
index 0000000000..d67a0b33e3
--- /dev/null
+++ b/share/doc/xsd/vnet_pool.xsd
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/share/install_gems/install_gems b/share/install_gems/install_gems
index e2c37f9ccf..9b1da6f65d 100755
--- a/share/install_gems/install_gems
+++ b/share/install_gems/install_gems
@@ -2,7 +2,7 @@
require 'pp'
-DEFAULT=%w{optional sunstone quota cloud ozones_server acct}
+DEFAULT=%w{optional sunstone quota cloud ozones_server acct auth_ldap}
if defined?(RUBY_VERSION) && RUBY_VERSION>="1.8.7"
SQLITE='sqlite3'
@@ -31,11 +31,16 @@ GROUPS={
:ozones_server_mysql => %w{json data_mapper dm-mysql-adapter mysql},
:acct => ['sequel', SQLITE, 'mysql'],
:acct_sqlite => ['sequel', SQLITE],
- :acct_mysql => ['sequel', 'mysql']
+ :acct_mysql => ['sequel', 'mysql'],
+ :auth_ldap => 'net-ldap'
}
PACKAGES=GROUPS.keys
+GEM_TEST={
+ 'net-ldap' => 'net/ldap'
+}
+
DISTRIBUTIONS={
:debian => {
:id => ['Ubuntu', 'Debian'],
@@ -95,8 +100,14 @@ def installed_gems
end
def try_library(name, error_message)
+ if GEM_TEST[name.to_s]
+ lib_test=GEM_TEST[name.to_s]
+ else
+ lib_test=name.to_s
+ end
+
begin
- require name.to_s
+ require lib_test
rescue LoadError, Exception
STDERR.puts error_message
exit(-1)
diff --git a/src/authm_mad/remotes/quota/quota.rb b/src/authm_mad/remotes/quota/quota.rb
index b9b29393bb..2303233433 100644
--- a/src/authm_mad/remotes/quota/quota.rb
+++ b/src/authm_mad/remotes/quota/quota.rb
@@ -82,7 +82,7 @@ class Quota
if template['TYPE'] == 'DATABLOCK'
template['SIZE'].to_i
elsif template['PATH']
- File.size(template['PATH'])
+ (File.size(template['PATH']).to_f / 2**20).round(2)
elsif template['SAVED_VM_ID']
vm_id = template['SAVED_VM_ID'].to_i
disk_id = template['SAVED_DISK_ID'].to_i
diff --git a/src/cloud/occi/etc/templates/network.erb b/src/cloud/occi/etc/templates/network.erb
new file mode 100644
index 0000000000..6dfb23079a
--- /dev/null
+++ b/src/cloud/occi/etc/templates/network.erb
@@ -0,0 +1,25 @@
+#
+# This template is processed by the OCCI Server to include specific data for
+# the VNET, you should not need to modify the ruby code.
+# You can add common attributes for your VNET templates (e.g. VLAN, PHYDEV)
+#
+
+NAME = "<%= @vnet_info['NAME'] %>"
+TYPE = RANGED
+
+NETWORK_ADDRESS = <%= @vnet_info['ADDRESS'] %>
+<% if @vnet_info['SIZE'] != nil %>
+NETWORK_SIZE = <%= @vnet_info['SIZE']%>
+<% end %>
+
+<% if @vnet_info['DESCRIPTION'] != nil %>
+DESCRIPTION = "<%= @vnet_info['DESCRIPTION'] %>"
+<% end %>
+
+<% if @vnet_info['PUBLIC'] != nil %>
+PUBLIC = "<%= @vnet_info['PUBLIC'] %>"
+<% end %>
+
+#BRIDGE = NAME_OF_DEFAULT_BRIDGE
+#PHYDEV = NAME_OF_PHYSICAL_DEVICE
+#VLAN = YES|NO
diff --git a/src/cloud/occi/lib/ImageOCCI.rb b/src/cloud/occi/lib/ImageOCCI.rb
index cd573554c3..50a12133f5 100755
--- a/src/cloud/occi/lib/ImageOCCI.rb
+++ b/src/cloud/occi/lib/ImageOCCI.rb
@@ -30,7 +30,7 @@ class ImageOCCI < Image
<%= self['TEMPLATE/DESCRIPTION'] %>
<% end %>
<%= self['SIZE'] %>
- <% if self['FSTYPE'] != nil %>
+ <% if self['FSTYPE'] != nil and !self['FSTYPE'].empty? %>
<%= self['FSTYPE'] %>
<% end %>
<%= self['PUBLIC'] == "0" ? "NO" : "YES"%>
diff --git a/src/mad/ruby/DriverExecHelper.rb b/src/mad/ruby/DriverExecHelper.rb
index d6b632b7e0..bb4b86d71b 100644
--- a/src/mad/ruby/DriverExecHelper.rb
+++ b/src/mad/ruby/DriverExecHelper.rb
@@ -44,6 +44,9 @@ module DriverExecHelper
# dummy paths
@remote_scripts_path = File.join(@remote_scripts_base_path, directory)
@local_scripts_path = File.join(@local_scripts_base_path, directory)
+
+ # mutex for logging
+ @send_mutex = Mutex.new
end
#
@@ -94,6 +97,14 @@ module DriverExecHelper
#
# METHODS FOR LOGS & COMMAND OUTPUT
#
+ # Sends a message to the OpenNebula core through stdout
+ def send_message(action="-", result=RESULT[:failure], id="-", info="-")
+ @send_mutex.synchronize {
+ STDOUT.puts "#{action} #{result} #{id} #{info}"
+ STDOUT.flush
+ }
+ end
+
# Sends a log message to ONE. The +message+ can be multiline, it will
# be automatically splitted by lines.
def log(number, message)
diff --git a/src/mad/ruby/OpenNebulaDriver.rb b/src/mad/ruby/OpenNebulaDriver.rb
index 758750aa75..18561f1fc7 100644
--- a/src/mad/ruby/OpenNebulaDriver.rb
+++ b/src/mad/ruby/OpenNebulaDriver.rb
@@ -57,23 +57,15 @@ class OpenNebulaDriver < ActionManager
super(@options[:concurrency], @options[:threaded])
- @retries = @options[:retries]
+ @retries = @options[:retries]
- @send_mutex = Mutex.new
-
#Set default values
initialize_helper(directory, @options)
register_action(:INIT, method("init"))
end
- # Sends a message to the OpenNebula core through stdout
- def send_message(action="-", result=RESULT[:failure], id="-", info="-")
- @send_mutex.synchronize {
- STDOUT.puts "#{action} #{result} #{id} #{info}"
- STDOUT.flush
- }
- end
+
# Calls remotes or local action checking the action name and
# @local_actions. Optional arguments can be specified as a hash
diff --git a/src/mad/ruby/scripts_common.rb b/src/mad/ruby/scripts_common.rb
index 8251ae48ff..8ded7d72cb 100644
--- a/src/mad/ruby/scripts_common.rb
+++ b/src/mad/ruby/scripts_common.rb
@@ -46,7 +46,7 @@ module OpenNebula
STDERR.puts format_error_message(message)
end
- #This function formats an error message for OpenNebula Copyright e
+ #This function formats an error message for OpenNebula
def self.format_error_message(message)
error_str = "ERROR MESSAGE --8<------\n"
error_str << message
diff --git a/src/mad/ruby/vmwarelib.rb b/src/mad/ruby/vmwarelib.rb
index a763e7f660..296346ff0e 100644
--- a/src/mad/ruby/vmwarelib.rb
+++ b/src/mad/ruby/vmwarelib.rb
@@ -14,47 +14,260 @@
# limitations under the License. #
# ---------------------------------------------------------------------------- #
-# ---------------------------------------------------------------------------- #
-# Set up the environment for the driver #
-# ---------------------------------------------------------------------------- #
-
-ONE_LOCATION = ENV["ONE_LOCATION"] if !defined?(ONE_LOCATION)
-
-if !ONE_LOCATION
- BIN_LOCATION = "/usr/bin" if !defined?(BIN_LOCATION)
- ETC_LOCATION = "/etc/one/" if !defined?(ETC_LOCATION)
- RUBY_LIB_LOCATION = "/usr/lib/one/ruby" if !defined?(RUBY_LIB_LOCATION)
-else
- BIN_LOCATION = ONE_LOCATION + "/bin" if !defined?(BIN_LOCATION)
- ETC_LOCATION = ONE_LOCATION + "/etc/" if !defined?(ETC_LOCATION)
- if !defined?(RUBY_LIB_LOCATION)
- RUBY_LIB_LOCATION = ONE_LOCATION + "/lib/ruby"
- end
-end
-
-$: << RUBY_LIB_LOCATION
-
-require "OpenNebulaDriver"
+require "scripts_common"
require "CommandManager"
-# Do host sustitution in the libvirt URI
-LIBVIRT_URI.gsub!('@HOST@', @host)
+class VmWareDriver
+ # -------------------------------------------------------------------------#
+ # Set up the environment for the driver #
+ # -------------------------------------------------------------------------#
+ ONE_LOCATION = ENV["ONE_LOCATION"]
-# Common functions
-def perform_action(command)
- command = BIN_LOCATION + "/tty_expect -u " + USERNAME + " -p " + PASSWORD + " " + command
-
- action_result = LocalCommand.run(command)
-
- if action_result.code == 0
- return action_result.stdout
+ if !ONE_LOCATION
+ BIN_LOCATION = "/usr/bin"
+ LIB_LOCATION = "/usr/lib/one"
+ ETC_LOCATION = "/etc/one/"
else
- log(command, action_result.stderr, action_result.stdout)
- return action_result.code
+ LIB_LOCATION = ONE_LOCATION + "/lib"
+ BIN_LOCATION = ONE_LOCATION + "/bin"
+ ETC_LOCATION = ONE_LOCATION + "/etc/"
end
-end
-def log(cmd, stdout, stderr)
- STDERR.puts "[VMWARE] cmd failed [" + cmd +
- "]. Stderr: " + stderr + ". Stdout: " + stdout
-end
+ CONF_FILE = ETC_LOCATION + "/vmwarerc"
+ CHECKPOINT = VAR_LOCATION + "/remotes/vmm/vmware/checkpoint"
+
+ ENV['LANG'] = 'C'
+
+ SHUTDOWN_INTERVAL = 5
+ SHUTDOWN_TIMEOUT = 500
+
+ def initialize(host)
+ conf = YAML::load(File.read(CONF_FILE))
+
+ @uri = conf[:libvirt_uri].gsub!('@HOST@', host)
+ @user = conf[:password]
+ @pass = conf[:username]
+
+ end
+
+ # ######################################################################## #
+ # VMWARE DRIVER ACTIONS #
+ # ######################################################################## #
+
+ # ------------------------------------------------------------------------ #
+ # Deploy & define a VM based on its description file #
+ # ------------------------------------------------------------------------ #
+ def deploy(dfile)
+ # Define the VM
+ deploy_id = define_domain(dfile)
+
+ exit -1 if deploy_id.nil?
+
+ # Start the VM
+ rc, info = do_action("virsh -c #{@uri} start #{deploy_id}")
+
+ if rc == false
+ undefine_domain(deploy_id)
+ exit info
+ end
+
+ return deploy_id
+ end
+
+ # ------------------------------------------------------------------------ #
+ # Cancels & undefine the VM #
+ # ------------------------------------------------------------------------ #
+ def cancel(deploy_id)
+ # Destroy the VM
+ rc, info = perform_action("virsh -c #{@uri} destroy #{deploy_id}")
+
+ if rc == false
+ exit info
+ end
+
+ # Undefine the VM
+ exit undefine_domain(deploy_id)
+ end
+
+ # ------------------------------------------------------------------------ #
+ # Migrate #
+ # ------------------------------------------------------------------------ #
+ def migrate
+ OpenNebula.log_error("TBD")
+ exit -1
+ end
+
+ # ------------------------------------------------------------------------ #
+ # Monitor a VM #
+ # ------------------------------------------------------------------------ #
+ def poll(deploy_id)
+ rc, info = do_action("virsh -c #{@uri} --readonly dominfo #{deploy_id}")
+
+ if rc == false
+ puts "STATE=d"
+ exit 0
+ end
+
+ state = ""
+
+ info.split('\n').each{ |line|
+ mdata = line.match("^State: (.*)")
+
+ if mdata
+ state = mdata[1].strip
+ break
+ end
+ }
+
+ case state
+ when "running","blocked","shutdown","dying"
+ state = 'a'
+ when "paused"
+ state = 'p'
+ when "crashed"
+ state = 'c'
+ else
+ state = 'd'
+ end
+
+ return "STATE=#{state_short}"
+ end
+
+ # ------------------------------------------------------------------------ #
+ # Restore a VM from a previously saved checkpoint #
+ # ------------------------------------------------------------------------ #
+ def restore(checkpoint)
+ begin
+ # Define the VM
+ dfile = File.dirname(File.dirname(checkpoint)) + "/deployment.0"
+ rescue => e
+ OpenNebula.log_error("Can not open checkpoint #{e.message}")
+ exit -1
+ end
+
+ deploy_id = define_domain(dfile)
+
+ exit -1 if did.nil?
+
+ # Revert snapshot VM
+ # Note: This assumes the checkpoint name is "checkpoint", to change
+ # this it is needed to change also [1]
+ #
+ # [1] $ONE_LOCATION/lib/remotes/vmm/vmware/checkpoint
+
+ rc, info = do_action(
+ "virsh -c #{@uri} snapshot-revert #{deploy_id} checkpoint")
+
+ exit info if rc == false
+
+ # Delete checkpoint
+ rc, info = do_action(
+ "virsh -c #{@uri} snapshot-delete #{deploy_id} checkpoint")
+
+ OpenNebula.log_error("Could not delete snapshot") if rc == false
+ end
+
+ # ------------------------------------------------------------------------ #
+ # Saves a VM taking a snapshot #
+ # ------------------------------------------------------------------------ #
+ def save(deploy_id)
+ # Take a snapshot for the VM
+ rc, info = do_action(
+ "virsh -c #{@uri} snapshot-create #{deploy_id} #{CHECKPOINT}")
+
+ exit info if rc == false
+
+ # Suspend VM
+ rc, info = do_action("virsh -c #{@uri} suspend #{deploy_id}")
+
+ exit info if rc == false
+
+ # Undefine VM
+ undefine_domain(deploy_id)
+ end
+
+ # ------------------------------------------------------------------------ #
+ # Shutdown a VM #
+ # ------------------------------------------------------------------------ #
+ def shutdown(deploy_id)
+ rc, info = do_action("virsh -c #{@uri} shutdown #{deploy_id}")
+
+ exit info if rc == false
+
+ counter = 0
+
+ begin
+ rc, info = do_action("virsh -c #{@uri} list")
+ info = "" if rc == false
+
+ sleep SHUTDOWN_INTERVAL
+
+ counter = counter + SHUTDOWN_INTERVAL
+ end while info.match(deploy_id) and counter < SHUTDOWN_TIMEOUT
+
+ if counter >= SHUTDOWN_TIMEOUT
+ OpenNebula.error_message(
+ "Timeout reached, VM #{deploy_id} is still alive")
+ exit - 1
+ end
+
+ undefine_domain(deploy_id)
+ end
+
+ # ######################################################################## #
+ # DRIVER HELPER FUNCTIONS #
+ # ######################################################################## #
+
+ private
+
+ #Generates an ESX command using ttyexpect
+ def esx_cmd(command)
+ cmd = BIN_LOCATION
+ cmd << "/tty_expect -u " << @user << " -p " << @pass << " " << command
+ end
+
+ #Performs a action usgin libvirt
+ def do_action(cmd)
+ rc = LocalCommand.run(esx_cmd(command))
+
+ if rc.code = 0
+ 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
+
+ # Undefines a domain in the ESX hypervisor
+ def undefine_domain(id)
+ rc, info = do_action("virsh -c #{@uri} undefine #{id}")
+
+ if rc == false
+ OpenNebula.log_error("Error undefining domain #{id}")
+ OpenNebula.log_error("Domain #{id} has to be undefined manually")
+ return info
+ end
+
+ return 0
+ end
+
+ #defines a domain in the ESX hypervisor
+ def define_domain(dfile)
+ deploy_id = nil
+ rc, info = do_action("virsh -c #{@uri} define #{dfile}")
+
+ return nil if rc == false
+
+ data.split('\n').each{ |line|
+ mdata = line.match("Domain (.*) defined from (.*)")
+
+ if mdata
+ deploy_id = mdata[1]
+ break
+ end
+ }
+
+ return deploy_id
+ end
+end
\ No newline at end of file
diff --git a/src/onedb/3.1.0_to_3.1.80.rb b/src/onedb/3.1.0_to_3.1.80.rb
index 5a27679015..022e096dfd 100644
--- a/src/onedb/3.1.0_to_3.1.80.rb
+++ b/src/onedb/3.1.0_to_3.1.80.rb
@@ -28,13 +28,42 @@ module Migrator
end
def up
- puts " > Networking isolation hooks have been moved to Host drivers.\n"<<
- " If you were using a networking hook, enter its name, or press enter\n"<<
- " to use the default dummy vn_mad driver.\n\n"
- print " Driver name (802.1Q, dummy, ebtables, ovswitch): "
- vn_mad = gets.chomp
+ puts " > Networking isolation hooks have been moved to Host drivers.\n"<<
+ " If you were using a networking hook, enter its name, or press enter\n"<<
+ " to use the default dummy vn_mad driver.\n\n"
- vn_mad = "dummy" if vn_mad.empty?
+ vn_mad = ""
+
+ while !( ["802.1Q", "dummy", "ebtables", "ovswitch", "fw"].include?(vn_mad) ) do
+ print " Driver name (802.1Q, dummy, ebtables, ovswitch, fw): "
+ vn_mad = gets.chomp
+ vn_mad = "dummy" if vn_mad.empty?
+ end
+
+ # 0 = all, 1 = none, 2 = interactive
+ vlan_option = 1
+
+ if ( vn_mad == "ebtables" || vn_mad == "ovswitch" )
+ puts
+ puts " > A new attribute, VLAN = YES/NO will be added to each VNET.\n"<<
+ " For driver '#{vn_mad}', please choose if you want to isolate all networks (all),\n"<<
+ " none (none), or be asked individually for each VNET (interactive)\n"
+
+ vlan = ""
+ while !( ["all", "none", "interactive"].include?(vlan) ) do
+ print " Isolate VNETs (all, none, interactive): "
+ vlan = gets.chomp
+ end
+
+ case vlan
+ when "all"
+ vlan_option = 0
+ when "none"
+ vlan_option = 1
+ when "interactive"
+ vlan_option = 2
+ end
+ end
# New VN_MAD element for hosts
@@ -80,7 +109,19 @@ module Migrator
net_address = e.text
}
- net_address = IPAddr.new(net_address, Socket::AF_INET)
+ net_valid = false
+ while !net_valid do
+ begin
+ net_address = IPAddr.new(net_address, Socket::AF_INET)
+ net_valid = true
+ rescue ArgumentError
+ puts
+ puts " > Error processing VNET ##{row[:oid]} '#{row[:name]}'\n"<<
+ " This network address is invalid: '#{net_address}'\n"
+ print " Please enter a valid network address: "
+ net_address = gets.chomp
+ end
+ end
st_size = ""
@@ -98,18 +139,44 @@ module Migrator
size = st_size.to_i
host_bits = (Math.log(size+2)/Math.log(2)).ceil
end
-
+
net_mask = 0xFFFFFFFF << host_bits
net_address = net_address.to_i & net_mask
- ip_start_elem.text = IPAddr.new((ip_start = net_address + 1), Socket::AF_INET).to_s
+ ip_start_elem.text = IPAddr.new((net_address + 1), Socket::AF_INET).to_s
ip_end_elem.text = IPAddr.new((net_address + (1 << host_bits) - 2), Socket::AF_INET).to_s
end
- # TODO: Set vlan = 1 if PHYDEV is set
+ phydev_present = false
+ doc.root.each_element("PHYDEV") { |e|
+ phydev_present = true
+ }
+
vlan_elem = doc.root.add_element("VLAN")
- vlan_elem.text = "0"
+
+ if phydev_present
+ vlan_elem.text = "1"
+ else
+ case vlan_option
+ when 0
+ vlan_elem.text = "1"
+ when 1
+ vlan_elem.text = "0"
+ when 2
+ vlan = ""
+ while !( ["y", "n"].include?(vlan) ) do
+ print " > Isolate VNET ##{row[:oid]} '#{row[:name]}'? (y/n) : "
+ vlan = gets.chomp
+ end
+
+ if ( vlan == "y" )
+ vlan_elem.text = "1"
+ else
+ vlan_elem.text = "0"
+ end
+ end
+ end
@db[:network_pool].insert(
:oid => row[:oid],
@@ -122,6 +189,27 @@ module Migrator
@db.run "DROP TABLE old_network_pool;"
+ # Add empty HISTORY_RECORDS element to VMs without any records
+ @db.run "ALTER TABLE vm_pool RENAME TO old_vm_pool;"
+ @db.run "CREATE TABLE vm_pool (oid INTEGER PRIMARY KEY, name VARCHAR(128), body TEXT, uid INTEGER, gid INTEGER, last_poll INTEGER, state INTEGER, lcm_state INTEGER);"
+ @db.run "INSERT INTO vm_pool SELECT * FROM old_vm_pool;"
+
+ @db.fetch("SELECT * FROM old_vm_pool") do |row|
+ doc = Document.new(row[:body])
+
+ found = false
+ doc.root.each_element("HISTORY_RECORDS") { |e|
+ found = true
+ }
+
+ if !found
+ doc.root.add_element("HISTORY_RECORDS")
+ end
+ end
+
+ @db.run "DROP TABLE old_vm_pool;"
+
+
return true
end
end
diff --git a/src/sunstone/public/js/plugins/vms-tab.js b/src/sunstone/public/js/plugins/vms-tab.js
index bdf52bc315..fcb660d857 100644
--- a/src/sunstone/public/js/plugins/vms-tab.js
+++ b/src/sunstone/public/js/plugins/vms-tab.js
@@ -750,20 +750,17 @@ function setupCreateVMDialog(){
if (!template_id.length){
notifyError("You have not selected a template");
return false;
- }
+ };
if (n_times.length){
n_times_int=parseInt(n_times,10);
- }
+ };
- if (n_times_int>1){
- if (!vm_name.length){
- vm_name = $('#template_id option:selected',this).text();
- }
- for (var i=0; i< n_times_int; i++){
- Sunstone.runAction("Template.instantiate",template_id,vm_name+"_"+i);
- };
- } else {
+ if (!vm_name.length){
+ vm_name = $('#template_id option:selected',this).text();
+ };
+
+ for (var i=0; i< n_times_int; i++){
Sunstone.runAction("Template.instantiate",template_id,vm_name);
};
diff --git a/src/vm/vm_var_syntax.cc b/src/vm/vm_var_syntax.cc
index 6a75d06320..a8b665169b 100644
--- a/src/vm/vm_var_syntax.cc
+++ b/src/vm/vm_var_syntax.cc
@@ -146,7 +146,6 @@ void get_image_attribute(VirtualMachine * vm,
ImagePool * ipool = nd.get_ipool();
Image * img;
int iid = -1;
- string iid_str;
int num;
vector attrs;
@@ -154,7 +153,7 @@ void get_image_attribute(VirtualMachine * vm,
attr_value.clear();
- if (img_name.empty() || img_name != "IMAGE_ID")
+ if ( img_name.empty() || (img_name!="IMAGE" && img_name!="IMAGE_ID") )
{
return;
}
@@ -174,11 +173,10 @@ void get_image_attribute(VirtualMachine * vm,
continue;
}
- iid_str = disk->vector_value("IMAGE_ID");
-
- if ( iid_str == img_value )
+ if ( disk->vector_value(img_name.c_str()) == img_value )
{
- istringstream iss(img_value);
+ string iid_str = disk->vector_value("IMAGE_ID");
+ istringstream iss(iid_str);
iss >> iid;
@@ -232,7 +230,6 @@ void get_network_attribute(VirtualMachine * vm,
VirtualNetworkPool * vnpool = nd.get_vnpool();
VirtualNetwork * vn;
int vnet_id = -1;
- string vnet_id_str;
int num;
vector attrs;
@@ -240,7 +237,7 @@ void get_network_attribute(VirtualMachine * vm,
attr_value.clear();
- if (net_name.empty() || net_name != "NETWORK_ID")
+ if ( net_name.empty() || (net_name!="NETWORK" && net_name!="NETWORK_ID") )
{
return;
}
@@ -260,11 +257,10 @@ void get_network_attribute(VirtualMachine * vm,
continue;
}
- vnet_id_str = net->vector_value("NETWORK_ID");
-
- if ( vnet_id_str == net_value )
+ if ( net->vector_value(net_name.c_str()) == net_value )
{
- istringstream iss(net_value);
+ string vnet_id_str = net->vector_value("NETWORK_ID");
+ istringstream iss(vnet_id_str);
iss >> vnet_id;
@@ -460,7 +456,7 @@ void insert_vector(VirtualMachine * vm,
/* Line 268 of yacc.c */
-#line 464 "vm_var_syntax.cc"
+#line 460 "vm_var_syntax.cc"
/* Enabling traces. */
#ifndef YYDEBUG
@@ -506,7 +502,7 @@ typedef union YYSTYPE
{
/* Line 293 of yacc.c */
-#line 408 "vm_var_syntax.y"
+#line 404 "vm_var_syntax.y"
char * val_str;
int val_int;
@@ -515,7 +511,7 @@ typedef union YYSTYPE
/* Line 293 of yacc.c */
-#line 519 "vm_var_syntax.cc"
+#line 515 "vm_var_syntax.cc"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
@@ -540,7 +536,7 @@ typedef struct YYLTYPE
/* Line 343 of yacc.c */
-#line 544 "vm_var_syntax.cc"
+#line 540 "vm_var_syntax.cc"
#ifdef short
# undef short
@@ -830,7 +826,7 @@ static const yytype_int8 yyrhs[] =
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
- 0, 432, 432, 433, 436, 440, 453, 468
+ 0, 428, 428, 429, 432, 436, 449, 464
};
#endif
@@ -1831,7 +1827,7 @@ yyreduce:
case 4:
/* Line 1806 of yacc.c */
-#line 437 "vm_var_syntax.y"
+#line 433 "vm_var_syntax.y"
{
(*parsed) << (yyvsp[(1) - (1)].val_str);
}
@@ -1840,7 +1836,7 @@ yyreduce:
case 5:
/* Line 1806 of yacc.c */
-#line 441 "vm_var_syntax.y"
+#line 437 "vm_var_syntax.y"
{
string name((yyvsp[(1) - (2)].val_str));
@@ -1858,7 +1854,7 @@ yyreduce:
case 6:
/* Line 1806 of yacc.c */
-#line 454 "vm_var_syntax.y"
+#line 450 "vm_var_syntax.y"
{
string name((yyvsp[(1) - (5)].val_str));
string vname((yyvsp[(3) - (5)].val_str));
@@ -1878,7 +1874,7 @@ yyreduce:
case 7:
/* Line 1806 of yacc.c */
-#line 469 "vm_var_syntax.y"
+#line 465 "vm_var_syntax.y"
{
string name((yyvsp[(1) - (9)].val_str));
string vname((yyvsp[(3) - (9)].val_str));
@@ -1901,7 +1897,7 @@ yyreduce:
/* Line 1806 of yacc.c */
-#line 1905 "vm_var_syntax.cc"
+#line 1901 "vm_var_syntax.cc"
default: break;
}
/* User semantic actions sometimes alter yychar, and that requires
@@ -2139,7 +2135,7 @@ yyreturn:
/* Line 2067 of yacc.c */
-#line 487 "vm_var_syntax.y"
+#line 483 "vm_var_syntax.y"
extern "C" void vm_var__error(
diff --git a/src/vm/vm_var_syntax.h b/src/vm/vm_var_syntax.h
index d40f8d1d51..337bb45d68 100644
--- a/src/vm/vm_var_syntax.h
+++ b/src/vm/vm_var_syntax.h
@@ -56,7 +56,7 @@ typedef union YYSTYPE
{
/* Line 2068 of yacc.c */
-#line 408 "vm_var_syntax.y"
+#line 404 "vm_var_syntax.y"
char * val_str;
int val_int;
diff --git a/src/vm/vm_var_syntax.y b/src/vm/vm_var_syntax.y
index bd75e41a02..027dade20e 100644
--- a/src/vm/vm_var_syntax.y
+++ b/src/vm/vm_var_syntax.y
@@ -85,7 +85,6 @@ void get_image_attribute(VirtualMachine * vm,
ImagePool * ipool = nd.get_ipool();
Image * img;
int iid = -1;
- string iid_str;
int num;
vector attrs;
@@ -93,7 +92,7 @@ void get_image_attribute(VirtualMachine * vm,
attr_value.clear();
- if (img_name.empty() || img_name != "IMAGE_ID")
+ if ( img_name.empty() || (img_name!="IMAGE" && img_name!="IMAGE_ID") )
{
return;
}
@@ -113,11 +112,10 @@ void get_image_attribute(VirtualMachine * vm,
continue;
}
- iid_str = disk->vector_value("IMAGE_ID");
-
- if ( iid_str == img_value )
+ if ( disk->vector_value(img_name.c_str()) == img_value )
{
- istringstream iss(img_value);
+ string iid_str = disk->vector_value("IMAGE_ID");
+ istringstream iss(iid_str);
iss >> iid;
@@ -171,7 +169,6 @@ void get_network_attribute(VirtualMachine * vm,
VirtualNetworkPool * vnpool = nd.get_vnpool();
VirtualNetwork * vn;
int vnet_id = -1;
- string vnet_id_str;
int num;
vector attrs;
@@ -179,7 +176,7 @@ void get_network_attribute(VirtualMachine * vm,
attr_value.clear();
- if (net_name.empty() || net_name != "NETWORK_ID")
+ if ( net_name.empty() || (net_name!="NETWORK" && net_name!="NETWORK_ID") )
{
return;
}
@@ -199,11 +196,10 @@ void get_network_attribute(VirtualMachine * vm,
continue;
}
- vnet_id_str = net->vector_value("NETWORK_ID");
-
- if ( vnet_id_str == net_value )
+ if ( net->vector_value(net_name.c_str()) == net_value )
{
- istringstream iss(net_value);
+ string vnet_id_str = net->vector_value("NETWORK_ID");
+ istringstream iss(vnet_id_str);
iss >> vnet_id;
diff --git a/src/vmm_mad/exec/one_vmm_exec.rb b/src/vmm_mad/exec/one_vmm_exec.rb
index ffd1bd6069..4b854a697a 100755
--- a/src/vmm_mad/exec/one_vmm_exec.rb
+++ b/src/vmm_mad/exec/one_vmm_exec.rb
@@ -68,20 +68,18 @@ class VmmAction
get_data(:dest_driver, :MIGR_NET_DRV)
# Initialize streams and vnm
- @ssh_src = @vmm.get_ssh_stream(@data[:host], @id)
+ @ssh_src = @vmm.get_ssh_stream(action, @data[:host], @id)
@vnm_src = VirtualNetworkDriver.new(@data[:net_drv],
:local_actions => @vmm.options[:local_actions],
:message => @xml_data,
- :ssh_stream => @ssh_src,
- :extra_data => @data)
+ :ssh_stream => @ssh_src)
if @data[:dest_host] and !@data[:dest_host].empty?
- @ssh_dst = @vmm.get_ssh_stream(@data[:dest_host], @id)
+ @ssh_dst = @vmm.get_ssh_stream(action, @data[:dest_host], @id)
@vnm_dst = VirtualNetworkDriver.new(@data[:dest_driver],
:local_actions => @vmm.options[:local_actions],
:message => @xml_data,
- :ssh_stream => @ssh_dst,
- :extra_data => @data)
+ :ssh_stream => @ssh_dst)
end
end
@@ -149,15 +147,15 @@ class VmmAction
vnm = @vnm_src
end
- result, info = vnm.do_action(@id, step[:action])
+ result, info = vnm.do_action(@id, step[:action],
+ :parameters => get_parameters(step[:parameters]))
else
result = DriverExecHelper.const_get(:RESULT)[:failure]
info = "No driver in #{step[:action]}"
end
# Save the step info
- @data["#{step[:action]}_info".to_sym] = info
- @data[step[:save_info_as]] = info if step[:save_info_as]
+ @data["#{step[:action]}_info".to_sym] = info.strip
# Roll back steps, store failed info and break steps
if DriverExecHelper.failed?(result)
@@ -170,7 +168,7 @@ class VmmAction
break
else
@vmm.log(@id,
- "Sussecfully execute #{DRIVER_NAMES[step[:driver]]} " \
+ "Successfully execute #{DRIVER_NAMES[step[:driver]]} " \
"operation: #{step[:action]}.")
end
end
@@ -230,10 +228,16 @@ class ExecDriver < VirtualMachineDriver
# @param[String] the hostname of the host
# @param[String] id of the VM to log messages
# @return [SshStreamCommand]
- def get_ssh_stream(host, id)
- SshStreamCommand.new(host,
- @remote_scripts_base_path,
- log_method(id))
+ def get_ssh_stream(aname, host, id)
+ stream = nil
+
+ if not action_is_local?(aname)
+ stream = SshStreamCommand.new(host,
+ @remote_scripts_base_path,
+ log_method(id))
+ else
+ return nil
+ end
end
#---------------------------------------------------------------------------
@@ -280,12 +284,12 @@ class ExecDriver < VirtualMachineDriver
:action => :deploy,
:parameters => [dfile, :host],
:stdin => domain,
- :save_info_as => :deploy_id
},
# Execute post-boot networking setup
{
:driver => :vnm,
:action => :post,
+ :parameters => [:deploy_info],
:fail_actions => [
{
:driver => :vmm,
@@ -391,6 +395,7 @@ class ExecDriver < VirtualMachineDriver
{
:driver => :vnm,
:action => :post,
+ :parameters => [:deploy_id],
:fail_actions => [
{
:driver => :vmm,
@@ -432,6 +437,7 @@ class ExecDriver < VirtualMachineDriver
{
:driver => :vnm,
:action => :post,
+ :parameters => [:deploy_id],
:destination => :true
#TODO :fail_action what to do here? cancel VM?
},
@@ -448,7 +454,7 @@ class ExecDriver < VirtualMachineDriver
host = data.elements['HOST'].text
deploy_id = data.elements['DEPLOY_ID'].text
- do_action("#{deploy_id} #{host}", id, host, :poll)
+ do_action("#{deploy_id} #{host}", id, host, ACTION[:poll])
end
end
@@ -496,5 +502,3 @@ exec_driver = ExecDriver.new(hypervisor,
:local_actions => local_actions)
exec_driver.start_driver
-
-
diff --git a/src/vmm_mad/exec/one_vmm_sh b/src/vmm_mad/exec/one_vmm_sh
index 77aed093fe..6db516936c 100755
--- a/src/vmm_mad/exec/one_vmm_sh
+++ b/src/vmm_mad/exec/one_vmm_sh
@@ -22,4 +22,4 @@ else
MAD_LOCATION=$ONE_LOCATION/lib/mads
fi
-exec $MAD_LOCATION/one_vmm_exec -l deploy,shutdown,cancel,save,restore,migrate,poll $*
+exec $MAD_LOCATION/one_vmm_exec -l deploy,shutdown,cancel,save,restore,migrate,poll,pre,post,clean $*
diff --git a/src/vmm_mad/remotes/vmware/deploy b/src/vmm_mad/remotes/vmware/deploy
index 24b3623ba6..aae48e318c 100755
--- a/src/vmm_mad/remotes/vmware/deploy
+++ b/src/vmm_mad/remotes/vmware/deploy
@@ -16,77 +16,24 @@
# limitations under the License. #
# ---------------------------------------------------------------------------- #
-ONE_LOCATION=ENV["ONE_LOCATION"] if !defined?(ONE_LOCATION)
+ONE_LOCATION=ENV["ONE_LOCATION"]
if !ONE_LOCATION
- ETC_LOCATION="/etc/one" if !defined?(ETC_LOCATION)
+ RUBY_LIB_LOCATION="/usr/lib/one/ruby"
else
- ETC_LOCATION=ONE_LOCATION+"/etc" if !defined?(ETC_LOCATION)
+ RUBY_LIB_LOCATION=ONE_LOCATION+"/lib/ruby"
end
-deployment_file = ARGV[0]
-@host = ARGV[1]
+$: << RUBY_LIB_LOCATION
+$: << File.dirname(__FILE__)
-if !@host or !deployment_file
- exit -1
-end
+require 'vmwarelib'
-load ETC_LOCATION + "/vmwarerc"
+dfile = ARGV[0]
+host = ARGV[1]
-if USERNAME.class!=String || PASSWORD.class!=String
- warn "Bad ESX credentials, aborting"
- exit -1
-end
+vmware_drv = VMWareDriver.new(host)
-# Define the VM
-data = perform_action("virsh -c #{LIBVIRT_URI} define #{deployment_file}")
+puts vmware_drv.deploy(dfile)
-if data.class == Fixnum
- exit data
-end
-
-domainname = ""
-success = false
-
-data.split('\n').each{ |line|
- domainname = line.match("Domain (.*) defined from (.*)")
- if domainname
- success = true
- break
- end
-}
-
-if !success
- exit -1
-end
-
-domainname = domainname[1]
-
-# Start the VM
-data = perform_action("virsh -c #{LIBVIRT_URI} start #{domainname}")
-
-if data.class == Fixnum
- exit data
-end
-
-definedname = domainname
-domainname = ""
-success = false
-
-data.split('\n').each{ |line|
- domainname = line.match("Domain (.*) started")
- if domainname
- success = true
- break
- end
-}
-
-if !success
- exit -1
-end
-
-if definedname != domainname[1]
- exit -1
-else
- puts definedname
-end
+exit 0
diff --git a/src/vmm_mad/remotes/vmware/vmwarerc b/src/vmm_mad/remotes/vmware/vmwarerc
index e3267f3ea6..4f789d2f31 100644
--- a/src/vmm_mad/remotes/vmware/vmwarerc
+++ b/src/vmm_mad/remotes/vmware/vmwarerc
@@ -14,28 +14,11 @@
# limitations under the License. #
# ---------------------------------------------------------------------------- #
-# User configurable variables (Ruby syntax)
-LIBVIRT_URI = "esx://@HOST@/?no_verify=1"
-QEMU_PROTOCOL = "qemu"
+# Libvirt configuration
+
+:libvirt_uri: "esx://@HOST@/?no_verify=1"
+:qemu_protocol: "qemu"
# Username and password of the VMware hypervisor
-USERNAME = "oneadmin"
-PASSWORD =
-
-# Loading the vmware library for mads
-# Please leave this uncommented
-ONE_LOCATION=ENV["ONE_LOCATION"] if !defined?(ONE_LOCATION)
-
-if !ONE_LOCATION
- LIB_LOCATION = "/usr/lib/one" if !defined?(LIB_LOCATION)
-else
- LIB_LOCATION = ONE_LOCATION+"/lib" if !defined?(LIB_LOCATION)
-end
-
-load LIB_LOCATION + "/ruby/vmwarelib.rb"
-
-ENV['LANG']='C'
-
-
-
-
+:username: "oneadmin"
+:password:
\ No newline at end of file
diff --git a/src/vmm_mad/remotes/xen/deploy b/src/vmm_mad/remotes/xen/deploy
index b91569c1cc..bae1ea0ba8 100755
--- a/src/vmm_mad/remotes/xen/deploy
+++ b/src/vmm_mad/remotes/xen/deploy
@@ -37,7 +37,7 @@ output=`$XM_CREATE $domain`
error_exit $? "Unable to create domain"
-domain_name=`echo $output | grep 'Started domain' | sed 's/^.*Started domain //' | tr -d '\n'`
+domain_name=`echo $output | grep 'Started domain' | sed 's/^.*Started domain //' | tr -d '\n' | cut -d' ' -f1`
out=`grep -e '^\#O CPU_CREDITS =' < $domain`
@@ -46,7 +46,7 @@ if [ "x$?" = "x0" ]; then
log_debug "Credits set to $credits"
- name=`grep -e '^name =' < $domain | cut -d= -f2 | tr -d ' ' | tr -d "\'"`
+ name=`grep -e '^name =' < $domain | cut -d= -f2 | tr -d ' ' | tr -d "\'" | cut -d' ' -f1`
$XM_CREDITS -d $name -w $credits
diff --git a/src/vnm_mad/one_vnm.rb b/src/vnm_mad/one_vnm.rb
index 23dba5a34e..27c2c10905 100644
--- a/src/vnm_mad/one_vnm.rb
+++ b/src/vnm_mad/one_vnm.rb
@@ -31,7 +31,6 @@ class VirtualNetworkDriver
@options = options
@ssh_stream = options[:ssh_stream]
@message = options[:message]
- @extra_data = options[:extra_data]
@vm_encoded = Base64.encode64(@message.elements['VM'].to_s).delete("\n")
@@ -45,18 +44,21 @@ class VirtualNetworkDriver
# @param [String, Symbol] aname name of the action
# @param [Hash] ops extra options for the command
# @option ops [String] :stdin text to be writen to stdin
+ # @option ops [String] :parameters additional parameters for vnm action
def do_action(id, aname, ops = {})
options={
- :stdin => nil,
+ :stdin => nil,
+ :parameters => nil
}.merge(ops)
- deploy_id=@extra_data[:deploy_id] || '-'
+ cmd_params = "#{@vm_encoded}"
+ cmd_params << " #{options[:parameters]}" if options[:parameters]
- cmd = action_command_line(aname, "#{@vm_encoded} #{deploy_id}")
+ cmd = action_command_line(aname, cmd_params)
if action_is_local?(aname)
execution = LocalCommand.run(cmd, log_method(id))
- else
+ elsif @ssh_stream != nil
if options[:stdin]
cmdin = "cat << EOT | #{cmd}"
stdin = "#{options[:stdin]}\nEOT\n"
@@ -66,8 +68,10 @@ class VirtualNetworkDriver
end
execution = @ssh_stream.run(cmdin, stdin, cmd)
+ else
+ return RESULT[:failure], "Network action #{aname} needs a ssh stream."
end
- result, info = get_info_from_execution(execution)
+ return get_info_from_execution(execution)
end
end
diff --git a/src/vnm_mad/remotes/test/OpenNebulaNetwork_spec.rb b/src/vnm_mad/remotes/test/OpenNebulaNetwork_spec.rb
index cfbfe8cf89..f451b53c3e 100644
--- a/src/vnm_mad/remotes/test/OpenNebulaNetwork_spec.rb
+++ b/src/vnm_mad/remotes/test/OpenNebulaNetwork_spec.rb
@@ -43,7 +43,7 @@ describe 'networking' do
$capture_commands = {
/virsh.*dumpxml/ => OUTPUT[:virsh_dumpxml]
}
- onevlan = OpenNebulaNetwork.new(OUTPUT[:onevm_show],"TEMPLATE/NIC","kvm")
+ onevlan = OpenNebulaNetwork.new(OUTPUT[:onevm_show],"TEMPLATE/NIC",nil,"kvm")
nics_expected = [{:bridge=>"br0",
:ip=>"172.16.0.100",
:mac=>"02:00:ac:10:00:64",
@@ -76,7 +76,7 @@ describe 'ebtables' do
/virsh.*dumpxml/ => OUTPUT[:virsh_dumpxml],
/ebtables/ => nil
}
- onevlan = EbtablesVLAN.new(OUTPUT[:onevm_show],"kvm")
+ onevlan = EbtablesVLAN.new(OUTPUT[:onevm_show],nil,"kvm")
onevlan.activate
ebtables_cmds = [
"sudo /sbin/ebtables -A FORWARD -s ! 02:00:ac:10:00:00/ff:ff:ff:ff:ff:00 -o vnet0 -j DROP",
@@ -98,7 +98,7 @@ describe 'openvswitch' do
/virsh.*dumpxml/ => OUTPUT[:virsh_dumpxml],
/ovs-vsctl/ => nil
}
- onevlan = OpenvSwitchVLAN.new(OUTPUT[:onevm_show],"kvm")
+ onevlan = OpenvSwitchVLAN.new(OUTPUT[:onevm_show],nil,"kvm")
onevlan.activate
openvswitch_tags = [
"sudo /usr/local/bin/ovs-vsctl set Port vnet0 tag=2",
@@ -117,7 +117,7 @@ describe 'openvswitch' do
/brctl show/ => OUTPUT[:brctl_show],
/ovs-vsctl/ => nil
}
- onevlan = OpenvSwitchVLAN.new(OUTPUT[:onevm_show_vlan_id_kvm],"kvm")
+ onevlan = OpenvSwitchVLAN.new(OUTPUT[:onevm_show_vlan_id_kvm],nil,"kvm")
onevlan.activate
onevlan_rules = ["sudo /usr/local/bin/ovs-vsctl set Port vnet0 tag=6",
@@ -166,7 +166,7 @@ describe 'host-managed' do
/ip link set/ => nil,
/ip link show/ => [nil,255]
}
- hm = OpenNebulaHM.new(OUTPUT[:onevm_show_phydev_kvm],"kvm")
+ hm = OpenNebulaHM.new(OUTPUT[:onevm_show_phydev_kvm],nil,"kvm")
hm.activate
hm_activate_rules = ["sudo /sbin/brctl addbr onebr6",
@@ -189,7 +189,7 @@ describe 'host-managed' do
/ip link set/ => nil,
/ip link show/ => [nil,255]
}
- hm = OpenNebulaHM.new(OUTPUT[:onevm_show_vlan_id_kvm],"kvm")
+ hm = OpenNebulaHM.new(OUTPUT[:onevm_show_vlan_id_kvm],nil,"kvm")
hm.activate
hm_vlan_id = ["sudo /sbin/brctl addbr onebr10",
@@ -222,7 +222,7 @@ describe 'host-managed' do
- hm = OpenNebulaHM.new(OUTPUT[:onevm_show_mixed],"kvm")
+ hm = OpenNebulaHM.new(OUTPUT[:onevm_show_mixed],nil,"kvm")
hm.activate
hm_vlan_tag = [ "sudo /sbin/brctl show",
diff --git a/src/vnm_mad/remotes/test/output/onevm_show_xen b/src/vnm_mad/remotes/test/output/onevm_show_xen
index 9f0685ad44..4952762493 100644
--- a/src/vnm_mad/remotes/test/output/onevm_show_xen
+++ b/src/vnm_mad/remotes/test/output/onevm_show_xen
@@ -34,7 +34,7 @@
-
+