Class: HammerCLIKatello::ContentViewComponent::AddComponents

Inherits:
HammerCLIKatello::ContentViewComponentBase::ComponentUpdateCommand show all
Defined in:
lib/hammer_cli_katello/content_view_component.rb

Instance Method Summary collapse

Methods inherited from HammerCLIKatello::ContentViewComponentBase::ComponentUpdateCommand

#fetch_cv, #fetch_cvv

Methods inherited from HammerCLIKatello::ContentViewComponentBase::ComponentCommand

#get_component_by_name_or_id, #get_components

Methods included from HammerCLIKatello::CompositeContentViewNameResolvable

#composite_content_view_resolve_options, included, #options

Methods included from OrganizationOptions

included, #org_options

Methods included from ResolverCommons

included

Instance Method Details

#request_paramsObject



120
121
122
123
124
125
126
127
128
129
130
# File 'lib/hammer_cli_katello/content_view_component.rb', line 120

def request_params
  super.tap do |opts|
    cv = fetch_cv
    component = {
      latest: (option_latest? || false)
    }
    component[:content_view_id] = cv if cv
    component[:content_view_version_id] = fetch_cvv(cv) unless component[:latest]
    opts['components'] = [component]
  end
end