'Set attributes on a port.'

def set(self, set_opt):

    self.module.log(('set    called    %s' % set_opt))
    if (not set_opt):
        return False
    (get_cmd, set_value) = _set_to_get(set_opt, self.module)
    (rtc, out, err) = self._vsctl(get_cmd, False)
    if (rtc != 0):
        out = None
    else:
        out = out.strip('\n')
        out = out.strip('"')
    if (out == set_value):
        return False
    (rtc, out, err) = self._vsctl((['--', 'set'] + set_opt.split('    ')))
    if (rtc != 0):
        self.module.fail_json(msg=err)
    return True
