Forum Discussion
5 Replies
- Satoshi_Toyosa1Employee
Are you referring to the "Parent Profile" field in GUI or the "defaults-from" attribute in tmsh? If so, it is named "detaultsFrom" in iControl REST (camel case naming convention). You should be able to see it. The following example retrieves this field from the profile 'httpTest' which is from the http profile.
curl -sku admin:<passwd> https://<host>/mgmt/tm/ltm/profile/http/httpTest?\$select=defaultsFrom
This httpTest has "Insert X-Forwarded-For" enabled and that's the only parameter that is different from the parent "http". You can see that only this field is different and other parameters are identical from the following test (obviously, name, defaultsFrom or any properties that are intrinsic to the profiles are different).
curl -sku admin:<passwd> https://<host>/mgmt/tm/ltm/profile/http/http | python -m json.tool > http curl -sku admin:<passwd> https://<host>/mgmt/tm/ltm/profile/http/httpTest | python -m json.tool > before diff http before 5c5,8 < "defaultsFrom": "none", --- > "defaultsFrom": "/Common/http", > "defaultsFromReference": { > "link": "https://localhost/mgmt/tm/ltm/profile/http/~Common~http?ver=14.1.0.1" > }, 47,48c50,51 < "fullPath": "http", < "generation": 1, --- > "fullPath": "httpTest", > "generation": 22, 57c60 < "insertXforwardedFor": "disabled", --- > "insertXforwardedFor": "enabled", 61c64 < "name": "http", --- > "name": "httpTest", 69c72 < "selfLink": "https://localhost/mgmt/tm/ltm/profile/http/http?ver=14.1.0.1", --- > "selfLink": "https://localhost/mgmt/tm/ltm/profile/http/httpTest?ver=14.1.0.1",
Or am I missing the point? Will you be able to show what you had performed and observed?
Thanks
- Jakub_SmejkalNimbostratus
thx for answer, but my problem is that I dont know if for example monitor timeout is set in profile httpTest or it is inherited value from parent http (it can be same value but not inherited), I couldnt find indicator in API where it would be distinguished
- Satoshi_Toyosa1Employee
While the list command of tmsh shows only the differences from the parent profile, unfortunately, iControl REST gets all the properties (equivalent to tmsh's 'all-properties'). To find the difference, you need to get both profiles and run diff.
- Jakub_SmejkalNimbostratus
Well this doesnt tell me if the value was inherited or not, so I have to look into CLI seems..
- Satoshi_Toyosa1Employee
If you are looking for common entries between two files, you can use the Unix 'comm' command. For example,
curl -sku admin:<pass> https://<host>/mgmt/tm/ltm/profile/http/httpTest | python -m json.tool > httpTest curl -sku admin:<pass> https://<host>/mgmt/tm/ltm/profile/http/http | jpython -m json.tool > http comm -12 http httpTest
This should give you the properties inherited from the parent http profile.