- Want to set a traffic direction (to Bidirectional) and assign a CONSUMER to a Custom app trough REST API, but issue is that unable to find the right API request that can show me Advanced Policy Settings.Need information about traffic direction, and consumers.
short answer is you create an application which is a consumer (e.g. name of "consumer"). The "trafficClass" will be "CONSUMER". You will need to get the id of this application (e.g. "xxxx")
you then update the policy attribute "networkUser ": { "applications" [{"appName" : "consumer", "id" : "xxxx", "stale" : false}]}
- Can you please advise what's the REST API for changing traffic direction to bidirectional?
you need to create a new policy that has the application as a network User
This is how a PointOfSale application is converted to Bidirectional.
[{
"policyName": "StoreQoS-BR",
"policyOwner": "admin",
"policyPriority": 4095,
"actions": ["SET_PROPERTY"],
"policyScope": "All-StoreDevicesWiredWireless",
"actionProperty": {
"relevanceLevel": "Business-Relevant"
},
"networkUser": {
"applications": [{
"id": "34559bc9-a432-44c1-81d7-96bb5aacb002",
"appName": "PointOfSale"
}]
},
"resource": {
"applications": []
}
}]
yes you can... just add multiple apps to the networkUser['applications'] list. snippet below.
"applications": [
{
"id": "34559bc9-a432-44c1-81d7-96bb5aacb002",
"appName": "PointOfSale"
},
{
"id": "2259bc9-a432-44c1-81d7-934b5aa23b003",
"appName": "PointOfSale2"
}
]
- What if we already have an existing policy created for a scope, how to update that policy instead of creating a new one. Noticed that if we created a brand new policy for a scope without existing policies, only the applications listed in the POST will be assigned to that scope&policy, does that mean we have to include all the applications one by one. or is there a a way to include the default applications as the GUI interface.
#1 They are done as two statements, but reference the same apps. You need to have the same name for both.
Note: the correct policy will have a -BR at the end of the name.
#2 The UI just grabs the default policy. There are really three policies, one for BR, Default and BI (business irrelevant).
Their names are:
- BUSINESS_RELEVANT_CVD_Policy
- DEFAULT_CVD_Policy
- BUSINESS_IRRELEVANT_CVD_Policy
You can just GET each of those, and extract the application list from them.
Comments
0 comments
Please sign in to leave a comment.