'Delete/Add the metadata in nova as needed.'

def meta_update(self, server, metadata):

    metadata = self.meta_serialize(metadata)
    current_md = server.metadata
    to_del = sorted((set(current_md) - set(metadata)))
    client = self.client()
    if (len(to_del) > 0):
        client.servers.delete_meta(server, to_del)
    client.servers.set_meta(server, metadata)
