5.7. Overriding Smart Class Parameters


You can search for Smart Parameters using the API and supply a value to override a Smart Parameter in a Class. You can find the full list of attributes that you can modify in the built-in API reference at https://satellite.example.com/apidoc/v2/smart_class_parameters/update.html.

  1. Find the ID of the Smart Class parameter you want to change:

    • List all Smart Class Parameters.

      Example request:

      $ curl --request GET --insecure --user sat_username:sat_password \
      https://satellite.example.com/api/smart_class_parameters
      Copy to Clipboard Toggle word wrap
    • If you know the Puppet class ID, for example 5, you can restrict the scope:

      Example request:

      $ curl --request GET --insecure --user sat_username:sat_password \
      https://satellite.example.com/api/puppetclasses/5/smart_class_parameters
      Copy to Clipboard Toggle word wrap

      Both calls accept a search parameter. You can view the full list of searchable fields in the Satellite web UI. Navigate to Configure > Smart variables and click in the search query box to reveal the list of fields.

      Two particularly useful search parameters are puppetclass_name and key, which you can use to search for a specific parameter. For example, using the --data option to pass URL encoded data.

      Example request:

      $ curl --request GET --insecure --user sat_username:sat_password \
      --data 'search=puppetclass_name = access_insights_client and key = authmethod' \
      https://satellite.example.com/api/smart_class_parameters
      Copy to Clipboard Toggle word wrap

      Satellite supports standard scoped-search syntax.

  2. When you find the ID of the parameter, list the full details including current override values.

    Example request:

    $ curl --request GET --insecure --user sat_username:sat_password \
    https://satellite.example.com/api/smart_class_parameters/63
    Copy to Clipboard Toggle word wrap
  3. Enable overriding of parameter values.

    Example request:

    $ curl --header "Accept:application/json,version=2" \
    --header "Content-Type:application/json" \
    --request PUT --insecure --user sat_username:sat_password \
    --data '{"smart_class_parameter":{"override":true}}' \
    https://satellite.example.com/api/smart_class_parameters/63
    Copy to Clipboard Toggle word wrap

    Note that you cannot create or delete the parameters manually. You can only modify their attributes. Satellite creates and deletes parameters only upon class import from a proxy.

  4. Add custom override matchers.

    Example request:

    $ curl --header "Accept:application/json,version=2" \
    --header "Content-Type:application/json" \
    --request PUT --insecure --user sat_username:sat_password \
    --data '{"smart_class_parameter":{"override_value":{"match":"hostgroup=Test","value":"2.4.6"}}}' \
    https://satellite.example.com/api/smart_class_parameters/63
    Copy to Clipboard Toggle word wrap

    For more information about override values, see https://satellite.example.com/apidoc/v2/override_values.html.

  5. You can delete override values.

    Example request:

    $ curl --request DELETE --user sat_username:sat_password \
    https://satellite.example.com/api/smart_class_parameters/63/override_values/3
    Copy to Clipboard Toggle word wrap
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat