lib/app42/command/config.rb in app42-0.6.4 vs lib/app42/command/config.rb in app42-0.7.0
- old
+ new
@@ -13,12 +13,12 @@
end
#
# return list of virtual machine type
#
- def get_vm_type
- build_get_request params, 'info', 'subscription'
+ def get_vm_type resource_type
+ build_get_request params, 'info', "subscription/#{resource_type}"
end
#
# return subscription
#
@@ -27,22 +27,41 @@
end
#
# return list of iaas_providers
#
- def get_iaas_provider
- build_get_request params, 'info', 'iaasproviders'
+ def get_iaas_provider( vm_type = "List")
+ query_params = params
+ query_params.store('type', vm_type)
+ build_get_request query_params, 'info', "iaasproviders/#{vm_type}"
end
#
# return list of runtimes
#
def get_runtimes
build_get_request params, 'info', 'runtimes'
end
#
+ # return list of runtimes for shared
+ #
+ def get_runtimes_for_shared
+ build_get_request params, 'info', 'runtimes'
+ end
+
+ #
+ # return list of runtimes for dedicated VM
+ #
+ def get_runtimes_for_dedicated iaas, vm_type
+ query_params = params
+ query_params.store('vmType', vm_type)
+ query_params.store('iaas', iaas)
+ build_get_request query_params, 'info', 'runtimes/dedicated'
+ end
+
+ #
# return list of setup type
#
def get_setup_type_fm_server
build_get_request params, 'info', 'setuptype'
end
@@ -76,10 +95,19 @@
query_params.store('setupName', setup_name)
build_get_request query_params, 'info', 'setupdetails'
end
#
+ # return setup details
+ #
+ def get_app_details app_name
+ query_params = params
+ query_params.store('appName', app_name)
+ build_get_request query_params, 'info', 'appdetails'
+ end
+
+ #
# return list of flavour
#
def get_flavour_type_fm_server
build_get_request params, 'info', 'flavour'
end
@@ -240,6 +268,6 @@
puts "Installing latest app42 client"
system ("gem install app42-0.5.0.gem")
end
end
-end
\ No newline at end of file
+end