cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1014
Views
0
Helpful
0
Replies

Can't use "displayName" to specify template

tigelane
Level 1
Level 1

Writing some Python code against MSO code 2.1(1i) and running into an issue.  I've found a solution, but think it's broken and I suspect I'm just using a workaround.  

 

1.  API "PATCH" /api/v1/schemas/{schemaid}

Screen Shot 2019-07-12 at 9.03.25 AM.png

 

2. Code snippet I'm inserting:  

"vrfRef": {
"schemaId": my_vrf_schema_id,
"templateName": my_vrf_template_name,
"vrfName": vrf_name
}


3. The value for key "templateName" (I'm using a variable above called my_vrf_template_name) needs to be the "name" key in the schema, rather than the "displayName".
4. The "name" is what you put in when you first create the Template, the "displayName" is the name given to it if you change it.


For a workaround I've done a quick loop through the schema templates looking for a displayName that matches what the one I want, and return the "name".  Other objects do not operate like this and take the displayName value when referencing them (like the Schema name).

 

Is this expected behavior to require the original name of an object or is this something that should be changed?

0 Replies 0