lib/gogetit/cli.rb in gogetit-0.15.2 vs lib/gogetit/cli.rb in gogetit-0.16.0
- old
+ new
@@ -67,10 +67,13 @@
:desc => 'A list of VLAN IDs to connect to'
method_option :ipaddresses, :aliases => '-i', :type => :array, \
:desc => 'A list of static IPs to assign'
method_option :"no-maas", :type => :boolean, \
:desc => 'Without MAAS awareness(only for LXD provider)'
+ method_option :"maas-on-lxc", :type => :boolean, \
+ :desc => 'To install MAAS on a LXC enabling necessary user config'\
+ '(only for LXD provider with no-maas enabled)'
method_option :"file", :aliases => '-f', :type => :string, \
:desc => 'File location(only for LXD provider)'
def create(name)
abort("'vlans' and 'ipaddresses' can not be set together.") \
if options['vlans'] and options['ipaddresses']
@@ -81,9 +84,12 @@
abort("when 'no-maas', the network configuration have to be set by 'file'.") \
if options['no-maas'] and (options['vlans'] or options['ipaddresses'])
abort("'no-maas' and 'file' have to be set together.") \
if options['no-maas'] ^ !!options['file']
+
+ abort("'maas-on-lxc' and 'no-maas' have to be set together.") \
+ if options['maas-on-lxc'] ^ !!options['no-maas']
abort("'distro' has to be set with libvirt provider.") \
if options['distro'] and options['provider'] == 'lxd'
abort("'alias' has to be set with lxd provider.") \