<s> import click <EOL> from tower_cli import models , resources <EOL> from tower_cli . utils import types <EOL> class Resource ( models . Resource ) : <EOL> cli_help = '<STR_LIT>' <EOL> endpoint = '<STR_LIT>' <EOL> identity = ( '<STR_LIT>' , '<STR_LIT:name>' ) <EOL> name = models . Field ( unique = True ) <EOL> description = models . Field ( required = False , display = False ) <EOL> inventory = models . Field ( type = types . Related ( '<STR_LIT>' ) ) <EOL> enabled = models . Field ( type = bool , required = False ) <EOL> variables = models . Field ( type = types . File ( '<STR_LIT:r>' ) , required = False , <EOL> display = False ) <EOL> @ resources . command ( use_fields_as_options = False ) <EOL> @ click . option ( '<STR_LIT>' , type = types . Related ( '<STR_LIT:host>' ) ) <EOL> @ click . option ( '<STR_LIT>' , type = types . Related ( '<STR_LIT>' ) ) <EOL> def associate ( self , host , group ) : <EOL> """<STR_LIT>""" <EOL> return self . _assoc ( '<STR_LIT>' , host , group ) <EOL> @ resources . command ( use_fields_as_options = False ) <EOL> @ click . option ( '<STR_LIT>' , type = types . Related ( '<STR_LIT:host>' ) ) <EOL> @ click . option ( '<STR_LIT>' , type = types . Related ( '<STR_LIT>' ) ) <EOL> def disassociate ( self , host , group ) : <EOL> """<STR_LIT>""" <EOL> return self . _disassoc ( '<STR_LIT>' , host , group ) </s>
