def action_set(self, hostname=None, action=None, subdoms=None, *args):
usage = "<STR_LIT>"<EOL>if hostname is None:<EOL><INDENT>sys.stderr.write("<STR_LIT>")<EOL>sys.stderr.write("<STR_LIT>" % usage)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if action is None:<EOL><INDENT>sys.stderr.write("<STR_LIT>")<EOL>sys.stderr.write("<STR_LIT>" % usage)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if subdoms is None or subdoms.lower() not in ("<STR_LIT:true>", "<STR_LIT:false>"):<EOL><INDENT>sys.stderr.write("<STR_LIT>")<EOL>sys.stderr.write("<STR_LIT>" % usage)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>options = {}<EOL>for arg in args:<EOL><INDENT>if "<STR_LIT:=>" not in arg:<EOL><INDENT>sys.stderr.write("<STR_LIT>" % (<EOL>arg<EOL>))<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>key, value = arg.split("<STR_LIT:=>", <NUM_LIT:1>)<EOL>options[key] = value<EOL><DEDENT>if action in ("<STR_LIT>") and "<STR_LIT>" not in options:<EOL><INDENT>sys.stderr.write("<STR_LIT>" % action)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if action == "<STR_LIT>" and "<STR_LIT:type>" not in options:<EOL><INDENT>sys.stderr.write("<STR_LIT>" % action)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if action == "<STR_LIT>" and "<STR_LIT>" not in options:<EOL><INDENT>sys.stderr.write("<STR_LIT>" % action)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if action == "<STR_LIT>" and "<STR_LIT:code>" not in options:<EOL><INDENT>sys.stderr.write("<STR_LIT>" % action)<EOL>sys.exit(<NUM_LIT:1>)<EOL><DEDENT>if "<STR_LIT>" in options:<EOL><INDENT>options['<STR_LIT>'] = [<EOL>(lambda x: (x[<NUM_LIT:0>], int(x[<NUM_LIT:1>])))(bit.split("<STR_LIT::>", <NUM_LIT:1>))<EOL>for bit in options['<STR_LIT>'].split("<STR_LIT:U+002C>")<EOL>]<EOL><DEDENT>self.client.set(<EOL>hostname,<EOL>[action, options, subdoms.lower() == "<STR_LIT:true>"]<EOL>)<EOL>
Adds a hostname to the LB, or alters an existing one