Class: Chef::Knife::Cloud::VraCatalogList
- Inherits:
-
ResourceListCommand
- Object
- ResourceListCommand
- Chef::Knife::Cloud::VraCatalogList
- Includes:
- VraServiceOptions
- Defined in:
- lib/chef/knife/vra_catalog_list.rb
Instance Method Summary collapse
Methods included from VraServiceOptions
Instance Method Details
#before_exec_command ⇒ Object
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/chef/knife/vra_catalog_list.rb', line 49 def before_exec_command @columns_with_info = [ { label: "Catalog ID", key: "id" }, { label: "Name", key: "name" }, { label: "Description", key: "description" }, { label: "Source", key: "source_name" }, ] @sort_by_field = "name" end |
#format_status_value(status) ⇒ Object
64 65 66 67 68 69 70 71 72 73 74 75 |
# File 'lib/chef/knife/vra_catalog_list.rb', line 64 def format_status_value(status) return "-" if status.nil? status = status.downcase color = if status == "published" :green else :red end ui.color(status, color) end |
#query_resource ⇒ Object
60 61 62 |
# File 'lib/chef/knife/vra_catalog_list.rb', line 60 def query_resource @service.list_catalog_items(config[:project_id], config[:entitled]) end |