lib/providers/lxd.rb in gogetit-0.2.0 vs lib/providers/lxd.rb in gogetit-0.2.1

- old
+ new

@@ -39,23 +39,10 @@ until get_state(name) == state sleep 3 end end - def wait_until_available(fqdn) - until ping_available?(fqdn) - logger.info("Calling <#{__method__.to_s}> for ping to be ready..") - sleep 3 - end - logger.info("#{fqdn} is now available to ping..") - until ssh_available?(fqdn, 'ubuntu') - logger.info("Calling <#{__method__.to_s}> for ssh to be ready..") - sleep 3 - end - logger.info("#{fqdn} is now available to ssh..") - end - def create(name, args = {}) logger.info("Calling <#{__method__.to_s}>") if container_exists?(name) or maas.domain_name_exists?(name) puts "Container #{name} already exists!" return false @@ -66,10 +53,10 @@ args[:sync] ||= true conn.create_container(name, args) conn.start_container(name, :sync=>"true") fqdn = name + '.' + maas.get_domain - wait_until_available(fqdn) + wait_until_available(fqdn, logger) logger.info("#{name} has been created.") true end def destroy(name, args = {})