My scripts broke in the past weeks, apparently, due to a change that requires that medium_id be passed. How does this fit into the larger picture of foretello?
···
--
@thomasmckay
–
“The leader must aim high, see big, judge widely, thus setting himself apart form the ordinary people who debate in narrow confines.” ~ Charles De Gaulle
“Leadership is about making others better as a result of your presence and making sure that impact lasts in your absence.” ~ Harvard Business School
Tom,
There's an open PR that removes the requirement for medium_id if a content_source is selected. I will soon check on the status of it and if it can be merged soon.
Joseph
···
----- Original Message -----
> From: "Tom McKay"
> To: foreman-dev@googlegroups.com
> Sent: Thursday, July 10, 2014 5:27:34 AM
> Subject: [foreman-dev] medium_id is required now on host create via api?
>
>
> My scripts broke in the past weeks, apparently, due to a change that requires
> that medium_id be passed. How does this fit into the larger picture of
> foretello?
>
>
> --
> @thomasmckay
>
> --
> "The leader must aim high, see big, judge widely, thus setting himself apart
> form the ordinary people who debate in narrow confines." ~ Charles De Gaulle
>
> "Leadership is about making others better as a result of your presence and
> making sure that impact lasts in your absence." ~ Harvard Business School
>
> --
> You received this message because you are subscribed to the Google Groups
> "foreman-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to foreman-dev+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
Tom,
It appears all relevant PR's have been merged. Are you working on the latest Foreman and Katello?
Here's the relevant code
foreman/app/models/host/managed.rb
validates :medium_id, :presence => true, :if => Proc.new { |host| host.validate_media? }
def validate_media?
managed && pxe_build? && build?
end
katello/app/models/katello/concerns/host_managed_extensions.rb
included do
alias_method_chain :validate_media?, :capsule
def validate_media_with_capsule?
content_source_id.blank? && validate_media_without_capsule?
end
Does you script include a content source? If yes, foreman's medium_id field should no longer be required.
Regards,
Joseph
···
----- Original Message -----
> From: "Joseph Magen"
> To: foreman-dev@googlegroups.com
> Sent: Thursday, July 10, 2014 9:48:04 AM
> Subject: Re: [foreman-dev] medium_id is required now on host create via api?
>
> Tom,
>
> There's an open PR that removes the requirement for medium_id if a
> content_source is selected. I will soon check on the status of it and if it
> can be merged soon.
>
> Joseph
>
>
>
>
>
> ----- Original Message -----
> > From: "Tom McKay"
> > To: foreman-dev@googlegroups.com
> > Sent: Thursday, July 10, 2014 5:27:34 AM
> > Subject: [foreman-dev] medium_id is required now on host create via api?
> >
> >
> > My scripts broke in the past weeks, apparently, due to a change that
> > requires
> > that medium_id be passed. How does this fit into the larger picture of
> > foretello?
> >
> >
> > --
> > @thomasmckay
> >
> > --
> > "The leader must aim high, see big, judge widely, thus setting himself
> > apart
> > form the ordinary people who debate in narrow confines." ~ Charles De
> > Gaulle
> >
> > "Leadership is about making others better as a result of your presence and
> > making sure that impact lasts in your absence." ~ Harvard Business School
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "foreman-dev" group.
> > To unsubscribe from this group and stop receiving emails from it, send an
> > email to foreman-dev+unsubscribe@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "foreman-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to foreman-dev+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>