March 23, 2015


Set a server's metadata
Set a server's metadata

import SoftLayer
from pprint import pprint as pp

# CHANGE ME
server = 678243 

client = SoftLayer.Client()

mask = "mask[attributes]"

# Sets the metadata for this server to tttttt
result1 = client['SoftLayer_Hardware_Server'].setUserMetadata({'value': 'tttttt'},id=server)
pp(result1)

result2 = client['SoftLayer_Hardware_Server'].getObject(mask=mask,id=server)

pp(result2)

Feedback?

We would love to hear it
Open an issue

/python/set_user_metadata/