class ApacheFelix::BundleApi
Attributes
Public Class Methods
# File lib/apache_felix_webconsole_client/api/bundle_api.rb, line 30 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Bundle
Info Display all information about a bundle, including properties. The returned list will contain one entry, the requested bundle. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java) @param bundle_id The symbolic name or id of the bundle. @param [Hash] opts the optional parameters @return [BundleList]
# File lib/apache_felix_webconsole_client/api/bundle_api.rb, line 39 def info(bundle_id, opts = {}) data, _status_code, _headers = info_with_http_info(bundle_id, opts) return data end
Bundle
Info Display all information about a bundle, including properties. The returned list will contain one entry, the requested bundle. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java) @param bundle_id The symbolic name or id of the bundle. @param [Hash] opts the optional parameters @return [Array<(BundleList
, Fixnum, Hash)>] BundleList
data, response status code and response headers
# File lib/apache_felix_webconsole_client/api/bundle_api.rb, line 49 def info_with_http_info(bundle_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BundleApi.info ..." end # verify the required parameter 'bundle_id' is set fail ArgumentError, "Missing the required parameter 'bundle_id' when calling BundleApi.info" if bundle_id.nil? # resource path local_var_path = "/bundles/{bundleId}.json".sub('{format}','json').sub('{' + 'bundleId' + '}', bundle_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basic'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BundleList') if @api_client.config.debugging @api_client.config.logger.debug "API called: BundleApi#info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Upload a bundle. Install the provided bundle. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java) @param bundlefile The bundle to upload. @param action The action to execute. Only allowed value is 'install', must be provided. Limitation of Swagger. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :bundlestart Flag to indicate whether or not bundle should be started. @option opts [Integer] :bundlestartlevel The start level of the provided bundle. @option opts [BOOLEAN] :refresh_packages Flag to indicate whether or not to refresh all pacakges once installed. @return [nil]
# File lib/apache_felix_webconsole_client/api/bundle_api.rb, line 100 def install(bundlefile, action, opts = {}) install_with_http_info(bundlefile, action, opts) return nil end
Upload a bundle. Install the provided bundle. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java) @param bundlefile The bundle to upload. @param action The action to execute. Only allowed value is 'install', must be provided. Limitation of Swagger. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :bundlestart Flag to indicate whether or not bundle should be started. @option opts [Integer] :bundlestartlevel The start level of the provided bundle. @option opts [BOOLEAN] :refresh_packages Flag to indicate whether or not to refresh all pacakges once installed. @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/apache_felix_webconsole_client/api/bundle_api.rb, line 114 def install_with_http_info(bundlefile, action, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BundleApi.install ..." end # verify the required parameter 'bundlefile' is set fail ArgumentError, "Missing the required parameter 'bundlefile' when calling BundleApi.install" if bundlefile.nil? # verify the required parameter 'action' is set fail ArgumentError, "Missing the required parameter 'action' when calling BundleApi.install" if action.nil? # verify enum value unless ['install'].include?(action) fail ArgumentError, "invalid value for 'action', must be one of install" end # resource path local_var_path = "/bundles/install".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['multipart/form-data'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} form_params["bundlefile"] = bundlefile form_params["action"] = action form_params["bundlestart"] = opts[:'bundlestart'] if !opts[:'bundlestart'].nil? form_params["bundlestartlevel"] = opts[:'bundlestartlevel'] if !opts[:'bundlestartlevel'].nil? form_params["refreshPackages"] = opts[:'refresh_packages'] if !opts[:'refresh_packages'].nil? # http body (model) post_body = nil auth_names = ['basic'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: BundleApi#install\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List bundles List all the bundles in the Felix system. Properties for a bundle will not be populated. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java) @param [Hash] opts the optional parameters @return [BundleList]
# File lib/apache_felix_webconsole_client/api/bundle_api.rb, line 170 def list(opts = {}) data, _status_code, _headers = list_with_http_info(opts) return data end
List bundles List all the bundles in the Felix system. Properties for a bundle will not be populated. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java) @param [Hash] opts the optional parameters @return [Array<(BundleList
, Fixnum, Hash)>] BundleList
data, response status code and response headers
# File lib/apache_felix_webconsole_client/api/bundle_api.rb, line 179 def list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BundleApi.list ..." end # resource path local_var_path = "/bundles.json".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = [] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basic'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BundleList') if @api_client.config.debugging @api_client.config.logger.debug "API called: BundleApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Modify bundles operation. Take action on a bundle; start, stop, update, refresh, uninstall. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java) @param bundle_symbolic_name The OSGi Symbolic name of the bundle. @param action The action to execute. @param [Hash] opts the optional parameters @return [BundleState]
# File lib/apache_felix_webconsole_client/api/bundle_api.rb, line 225 def modify(bundle_symbolic_name, action, opts = {}) data, _status_code, _headers = modify_with_http_info(bundle_symbolic_name, action, opts) return data end
Modify bundles operation. Take action on a bundle; start, stop, update, refresh, uninstall. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java) @param bundle_symbolic_name The OSGi Symbolic name of the bundle. @param action The action to execute. @param [Hash] opts the optional parameters @return [Array<(BundleState
, Fixnum, Hash)>] BundleState
data, response status code and response headers
# File lib/apache_felix_webconsole_client/api/bundle_api.rb, line 236 def modify_with_http_info(bundle_symbolic_name, action, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BundleApi.modify ..." end # verify the required parameter 'bundle_symbolic_name' is set fail ArgumentError, "Missing the required parameter 'bundle_symbolic_name' when calling BundleApi.modify" if bundle_symbolic_name.nil? # verify the required parameter 'action' is set fail ArgumentError, "Missing the required parameter 'action' when calling BundleApi.modify" if action.nil? # verify enum value unless ['start', 'stop', 'update', 'refresh', 'uninstall'].include?(action) fail ArgumentError, "invalid value for 'action', must be one of start, stop, update, refresh, uninstall" end # resource path local_var_path = "/bundles/{bundleSymbolicName}".sub('{format}','json').sub('{' + 'bundleSymbolicName' + '}', bundle_symbolic_name.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/x-www-form-urlencoded'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} form_params["action"] = action # http body (model) post_body = nil auth_names = ['basic'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BundleState') if @api_client.config.debugging @api_client.config.logger.debug "API called: BundleApi#modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Modify bundles operation. Take action on all bundles - refresh packages. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java) @param action The action to execute. Only allowed value is 'refreshPackages', must be provided. Limitation of Swagger. @param [Hash] opts the optional parameters @return [BundleList]
# File lib/apache_felix_webconsole_client/api/bundle_api.rb, line 290 def refresh_packages(action, opts = {}) data, _status_code, _headers = refresh_packages_with_http_info(action, opts) return data end
Modify bundles operation. Take action on all bundles - refresh packages. (See org.apache.felix.webconsole.internal.core.BundlesServlet.java) @param action The action to execute. Only allowed value is 'refreshPackages', must be provided. Limitation of Swagger. @param [Hash] opts the optional parameters @return [Array<(BundleList
, Fixnum, Hash)>] BundleList
data, response status code and response headers
# File lib/apache_felix_webconsole_client/api/bundle_api.rb, line 300 def refresh_packages_with_http_info(action, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: BundleApi.refresh_packages ..." end # verify the required parameter 'action' is set fail ArgumentError, "Missing the required parameter 'action' when calling BundleApi.refresh_packages" if action.nil? # verify enum value unless ['refreshPackages'].include?(action) fail ArgumentError, "invalid value for 'action', must be one of refreshPackages" end # resource path local_var_path = "/bundles".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = [] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/x-www-form-urlencoded'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} form_params["action"] = action # http body (model) post_body = nil auth_names = ['basic'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'BundleList') if @api_client.config.debugging @api_client.config.logger.debug "API called: BundleApi#refresh_packages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end