gogetit 0.21.1 → 0.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cec3025d3d37da25d264556d84373b5211c09640877117aaf2edfde182545f64
4
- data.tar.gz: e7e3d060a85d03cf7720f9563582f35c45472eb53dd338c47b6abef3393ad036
3
+ metadata.gz: ba0608a42390622d4ae89615733214bdb75e01b251f56b77409fd9406bb089a5
4
+ data.tar.gz: da74ed1fdbcacc0812dae8fe2ea827a71606bd2dfff3b93f5be40ac66a5a24b0
5
5
  SHA512:
6
- metadata.gz: 4c55e8011cbd55993e901135cf4fdb0b8eca24c8abe8c5b78e43f233396689eb6a4931569245f898d3794cf7c7d350a9b3da125dfdb4d169b9462921edf73a25
7
- data.tar.gz: 19798bb065fba34ac5f6c51ebf699bed5cab7e9143d26bcc97ae335e21d43c8d454899a827a5c01735fc383ed5bff5dfe2d24415afeb64c4bb27a7b708396e29
6
+ metadata.gz: c7863bdecbec3487dc95f4807495356f6f6567ad677d55b2396119915024c838b2632a103f41acc67d1a96483adecfd21850fb3e420d3e4d7d737107bb73ab4a
7
+ data.tar.gz: 107fbfb0536644765b787a978101a3e2f9c2b105475d2063af1b8700b0a187304e4e701e36d22cc6d43f7e33a55ddec541f61dbacd8da4ba920d36c0704e1aa1
data/README.md CHANGED
@@ -66,6 +66,9 @@ gogetit create lxd02 -p lxd -a centos7
66
66
  # When specifying distro for Libvirt provider
67
67
  gogetit create kvm01 -p libvirt -d centos
68
68
 
69
+ # When specifying a spec for Libvirt provider
70
+ gogetit create kvm01 -p libvirt -s ceph
71
+
69
72
  # When deploying on an existing machine(only for libvirt provider)
70
73
  gogetit deploy kvm01
71
74
  gogetit deploy kvm01 -d centos
@@ -55,6 +55,8 @@ module Gogetit
55
55
  desc 'create NAME', 'Create either a container or KVM domain.'
56
56
  method_option :provider, :aliases => '-p', :type => :string, \
57
57
  :default => 'lxd', :desc => 'A provider such as lxd and libvirt'
58
+ method_option :spec, :aliases => '-s', :type => :string, \
59
+ :desc => 'A spec specified in gogetit.yml'
58
60
  method_option :alias, :aliases => '-a', :type => :string, \
59
61
  :desc => 'An alias name for a lxd image'
60
62
  method_option :distro, :aliases => '-d', :type => :string, \
@@ -77,18 +79,20 @@ module Gogetit
77
79
  method_option :"file", :aliases => '-f', :type => :string, \
78
80
  :desc => 'File location(only for LXD provider)'
79
81
  def create(name)
80
- abort("'vlans' and 'ipaddresses' can not be set together.") \
82
+ abort(":vlans and :ipaddresses can not be set together.") \
81
83
  if options[:vlans] and options[:ipaddresses]
82
- abort("'chef' and 'zero' can not be set together.") \
84
+ abort(":chef and :zero can not be set together.") \
83
85
  if options[:chef] and options[:zero]
84
- abort("when 'no-maas', the network configuration have to be set by 'file'.") \
86
+ abort("when :'no-maas', the network configuration have to be set by :file.") \
85
87
  if options[:'no-maas'] and (options[:vlans] or options[:ipaddresses])
86
- abort("'no-maas' and 'file' have to be set together.") \
88
+ abort(":'no-maas' and :file have to be set together.") \
87
89
  if options[:'no-maas'] ^ !!options[:file]
88
- abort("'distro' has to be set only with libvirt provider.") \
90
+ abort(":distro has to be set only with libvirt provider.") \
89
91
  if options[:distro] and options[:provider] == 'lxd'
90
- abort("'alias' has to be set with lxd provider.") \
92
+ abort(":alias has to be set with lxd provider.") \
91
93
  if options[:alias] and options[:provider] == 'libvirt'
94
+ abort(":spec has to be set only with libvirt provider.") \
95
+ if options[:spec] and options[:provider] == 'lxd'
92
96
 
93
97
  case options[:provider]
94
98
  when 'lxd'
@@ -114,7 +118,7 @@ module Gogetit
114
118
  method_option :zero, :aliases => '-z', :type => :boolean, \
115
119
  :default => false, :desc => 'Chef Zero awareness'
116
120
  def destroy(name)
117
- abort("'chef' and 'zero' can not be set together.") \
121
+ abort(":chef and :zero can not be set together.") \
118
122
  if options[:chef] and options[:zero]
119
123
 
120
124
  provider = get_provider_of(name, providers)
@@ -145,7 +149,7 @@ module Gogetit
145
149
  method_option :zero, :aliases => '-z', :type => :boolean, \
146
150
  :default => false, :desc => 'Chef Zero awareness'
147
151
  def deploy(name)
148
- abort("'chef' and 'zero' can not be set together.") \
152
+ abort(":chef and :zero can not be set together.") \
149
153
  if options[:chef] and options[:zero]
150
154
 
151
155
  Gogetit::CLI.result = libvirt.deploy(name, options)
@@ -166,7 +170,7 @@ module Gogetit
166
170
  method_option :zero, :aliases => '-z', :type => :boolean, \
167
171
  :default => false, :desc => 'Chef Zero awareness'
168
172
  def release(name)
169
- abort("'chef' and 'zero' can not be set together.") \
173
+ abort(":chef and :zero can not be set together.") \
170
174
  if options[:chef] and options[:zero]
171
175
 
172
176
  Gogetit::CLI.result = libvirt.release(name)
@@ -187,7 +191,7 @@ module Gogetit
187
191
  method_option :zero, :aliases => '-z', :type => :boolean, \
188
192
  :default => false, :desc => 'Chef Zero awareness'
189
193
  def rebuild(name)
190
- abort("'chef' and 'zero' can not be set together.") \
194
+ abort(":chef and :zero can not be set together.") \
191
195
  if options[:chef] and options[:zero]
192
196
 
193
197
  provider = get_provider_of(name, providers)
@@ -1,3 +1,3 @@
1
1
  module Gogetit
2
- VERSION = "0.21.1"
2
+ VERSION = "0.22.0"
3
3
  end
@@ -160,7 +160,12 @@ module Gogetit
160
160
  " Please check both on MAAS and libvirt.") \
161
161
  if maas.domain_name_exists?(name) or domain_exists?(name)
162
162
 
163
- domain = config[:libvirt][:specs][:default]
163
+ if options[:spec]
164
+ domain = config[:libvirt][:specs][:"#{options[:spec]}"]
165
+ else
166
+ domain = config[:libvirt][:specs][:default]
167
+ end
168
+
164
169
  ifaces = nil
165
170
 
166
171
  if options[:ipaddresses]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gogetit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.1
4
+ version: 0.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Don Draper