lib/gogetit/maas.rb in gogetit-0.3.0 vs lib/gogetit/maas.rb in gogetit-0.4.0
- old
+ new
@@ -39,10 +39,15 @@
def domain_name_exists?(name)
logger.info("Calling <#{__method__.to_s}>")
return true if dnsresource_exists?(name) or machine_exists?(name)
end
+ def get_subnets
+ logger.info("Calling <#{__method__.to_s}>")
+ return conn.request(:get, ['subnets'])
+ end
+
def ip_reserved?(addresses)
logger.info("Calling <#{__method__.to_s}>")
ips = Set.new
addresses.each do |ip|
ips.add(IPAddr.new(ip))
@@ -207,8 +212,18 @@
end
def change_hostname(system_id, hostname)
logger.info("Calling <#{__method__.to_s}>")
conn.request(:put, ['machines', system_id], { 'hostname' => hostname })
+ end
+
+ def get_sshkeys
+ logger.info("Calling <#{__method__.to_s}>")
+ conn.request(:get, ['account', 'prefs', 'sshkeys'])
+ end
+
+ def get_package_repos
+ logger.info("Calling <#{__method__.to_s}>")
+ conn.request(:get, ['package-repositories'])
end
end
end