class Chef::Knife::Cloud::VraCatalogList
Public Instance Methods
before_exec_command()
click to toggle source
# File lib/chef/knife/vra_catalog_list.rb, line 45 def before_exec_command @columns_with_info = [ { label: "Catalog ID", key: "id" }, { label: "Name", key: "name" }, { label: "Description", key: "description" }, { label: "Status", key: "status", value_callback: method(:format_status_value) }, { label: "Subtenant", key: "subtenant_name" }, ] @sort_by_field = "name" end
format_status_value(status)
click to toggle source
# File lib/chef/knife/vra_catalog_list.rb, line 61 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()
click to toggle source
# File lib/chef/knife/vra_catalog_list.rb, line 57 def query_resource @service.list_catalog_items(config[:entitled]) end