Handling Custom Labels Created in PAS
NCP can handle custom labels that you create on an app in PAS. NCP will create
corresponding tags in NSX-T for those labels.
In PAS, you can create labels with the following command. For
example,
cf curl v3/apps/<app-guid> -X PATCH -d '{"metadata": {"labels": {"aaa": "111", "bbb": "222"}}
You can also delete a label by setting the
value of a label to
null
, For
example,cf curl v3/apps/<app-guid> -X PATCH -d '{"metadata": {"labels":{"aaa": null}}}'
These commands trigger events that NCP can
retrieve. For a new label, for example,
"aaa":"111"
, NCP will
create the tag app_label/aaa:111
for the logical ports of all the
app instances. If you delete a label, the corresponding tag will be removed.