knife-xapi 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -23,16 +23,20 @@ Chef::Config[:knife][:xapi_bootstrap] :: Not implemented yet, but will be the b
23
23
  ==Usage
24
24
 
25
25
  Basic usage to create a VM from existing VM template:
26
- knife xapi guest create "NewBox" "public" --xapi-vm-template "MyBaseBox" --host http://sandbox/
26
+ knife xapi guest create "NewBox" "public" --xapi-vm-template "MyBaseBox" --host http://sandbox/
27
27
 
28
28
 
29
29
  More verbose example using a kickstart file and booting the Centos 5 default template:
30
- knife xapi guest create "MySpiffyBox" "pub_network" --host http://sandbox/ -B "dns=8.8.8.8 ks=http://192.168.6.4/repo/ks/default.ks ip=192.168.6.7 netmask=255.255.255.0 gateway=192.168.6.1" -R http://192.168.6.5/repo/centos/5/os/x86_64 -C 4 -M 4g -D 5g
31
- * -B is boot args where i am assigning all the centos/rhel boot args for Ip setup and kickstart file
32
- * -R is the repo URL used by xenserver to start the net install
33
- * -C is the number of cpus for this gues
34
- * -M is the Memory size
35
- * -D is the disk size
36
-
37
- ==Source
30
+ knife xapi guest create "MySpiffyBox" "pub_network" --host http://sandbox/ \
31
+ -B "dns=8.8.8.8 ks=http://192.168.6.4/repo/ks/default.ks ip=192.168.6.7 netmask=255.255.255.0 gateway=192.168.6.1" \
32
+ -R http://192.168.6.5/repo/centos/5/os/x86_64 -C 4 -M 4g -D 5g
33
+ *-B Boot args where i am assigning all the centos/rhel boot args for Ip setup and kickstart file
34
+ *-R Repo URL used by xenserver to start the net install
35
+ *-C Number of cpus for this guest
36
+ *-M Memory size
37
+ *-D Disk size
38
+
39
+ Use Knife builtin help schematic for more info
40
+ knife xapi guest create --help
41
+
38
42
 
@@ -96,7 +96,7 @@ class Chef
96
96
  ui.msg "Cloning Guest from Template: #{h.color(template_ref, :bold, :cyan )}"
97
97
  vm_ref = xapi.VM.clone(template_ref, server_name)
98
98
 
99
- # begin
99
+ begin
100
100
  xapi.VM.set_name_description(vm_ref, "VM built by knife-xapi as #{server_name}")
101
101
 
102
102
  # configure the install repo
@@ -154,12 +154,12 @@ class Chef
154
154
  ui.msg "Starting new Guest: #{h.color( provisioned, :cyan)} "
155
155
  xapi.Async.VM.start(vm_ref, false, true)
156
156
 
157
- # rescue Exception => e
158
- # ui.msg "#{h.color 'ERROR:'} #{h.color( e.message, :red )}"
159
- # ui.error "#{h.color( e.backtrace, :yellow)}"
160
- #
161
- # cleanup(vm_ref)
162
- # end
157
+ rescue Exception => e
158
+ ui.msg "#{h.color 'ERROR:'} #{h.color( e.message, :red )}"
159
+ ui.error "#{h.color( e.backtrace, :yellow)}"
160
+
161
+ cleanup(vm_ref)
162
+ end
163
163
  # TODO: bootstrap
164
164
  end
165
165
 
@@ -1,3 +1,3 @@
1
1
  module KnifeXenserver
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-xapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: