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



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

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