Cannot override value using API

Solution Unverified - Updated -

Issue

  • Cannot override value using API

  • API endpoint used is:

POST https://<satellite>/api/v2/puppetclasses/os_caj/smart_class_parameters/firewall_role/override_values

And formatted JSON is:

{
  "override_value": [
    {
      "match": "kt_env=itg,hostgroup=qcc2015-1.48-caj-64",
      "value": [
        "ssh-server",
        "oml-manager",
        "mysql-server"
      ]
    },
    {
      "match": "kt_env=pre,hostgroup=qcc2015-1.48-caj-64",
      "value": [
        "ssh-server",
        "oml-manager",
        "mysql-server"
      ]
    },
    {
      "match": "kt_env=pro,hostgroup=qcc2015-1.48-caj-64",
      "value": [
        "ssh-server",
        "oml-manager",
        "mysql-server"
      ]
    }
  ]
}

In the logs:-

[E] Validation failed: Match has already been taken (ActiveRecord::RecordInvalid)

Environment

  • Red Hat Satellite 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content