SasoB
Contributor
Contributor

vCloud 10.2 Removing Metadata

Jump to solution

Hi,

I kind of managed to add a Metadata key with / in its name. And now I don't know how to remove it.

If I try through GUI or with API call I get error 500, or if I don't urlencode the key than its error 400.

 

Any suggestions? Is it possible to remove all key with API?

 

Thank you

0 Kudos
1 Solution

Accepted Solutions
SasoB
Contributor
Contributor

Solution provided from support was to delete that tag directly from database.

1. SSH or CLI to vCD
2. Login as root
3. Change user "sudo -i -u postgres"
4. Open DB "psql vcloud"
5. User select to get id you want to delete "select * from metadata;"
6. Use id from step 5. to get id value table  "select * from metadata_string_value where metadata_id = '<ID of the metadata>';" 
7. Use id from step 5. to delete row "delete from metadata_string_value where metadata_id = '<ID of the metadata>';"
8. Use id from step 5. to delete row "delete from metadata where id = ' <Id of the metadata>';"

View solution in original post

0 Kudos
1 Reply
SasoB
Contributor
Contributor

Solution provided from support was to delete that tag directly from database.

1. SSH or CLI to vCD
2. Login as root
3. Change user "sudo -i -u postgres"
4. Open DB "psql vcloud"
5. User select to get id you want to delete "select * from metadata;"
6. Use id from step 5. to get id value table  "select * from metadata_string_value where metadata_id = '<ID of the metadata>';" 
7. Use id from step 5. to delete row "delete from metadata_string_value where metadata_id = '<ID of the metadata>';"
8. Use id from step 5. to delete row "delete from metadata where id = ' <Id of the metadata>';"

0 Kudos