cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
160
Views
5
Helpful
1
Replies
wizi
Beginner

YANG PUT - Change Key Value

This is related to YANG module Cisco-IOS-XE-wireless-wlan-cfg.

The container I'm working on is below. Is it possible to change the value of "policy-profile-name" after the resource is created? When I attempt to do so, I receive a 'mismatched keypath' error. 

 

container wlan-policies {
      description
        "WLAN policy configuration";
      list wlan-policy {
        key "policy-profile-name";
        description
          "List of WLAN policy configurations";
        uses wireless-wlan-cfg:st-wlan-policies;
      }
    }
{
    "errors": {
        "error": [
            {
                "error-message": "mismatched keypaths: /wireless-wlan-cfg:wlan-cfg-data/wireless-wlan-cfg:wlan-policies/wireless-wlan-cfg:wlan-policy[wireless-wlan-cfg:policy-profile-name='POLICY_PROFILE_1_NEW'] , /wireless-wlan-cfg:wlan-cfg-data/wireless-wlan-cfg:wlan-policies/wireless-wlan-cfg:wlan-policy[wireless-wlan-cfg:policy-profile-name='POLICY_PROFILE_1']",
                "error-path": "/Cisco-IOS-XE-wireless-wlan-cfg:wlan-cfg-data/wlan-policies/wlan-policy=POLICY_PROFILE_1",
                "error-tag": "malformed-message",
                "error-type": "application"
            }
        ]
    }
}

 

1 ACCEPTED SOLUTION

Accepted Solutions
yangorelik
Participant

Hello wizi

You cannot change key of the list element. Basically you need delete the existing element and then create element with new key.

Yan Gorelik
YDK Solutions

View solution in original post

1 REPLY 1
yangorelik
Participant

Hello wizi

You cannot change key of the list element. Basically you need delete the existing element and then create element with new key.

Yan Gorelik
YDK Solutions

View solution in original post

Content for Community-Ad