<s> """<STR_LIT>""" <EOL> import click <EOL> import SoftLayer <EOL> from SoftLayer . CLI import environment <EOL> from SoftLayer . CLI import exceptions <EOL> from SoftLayer . CLI import helpers <EOL> @ click . command ( ) <EOL> @ click . argument ( '<STR_LIT>' , type = int ) <EOL> @ click . option ( '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> help = "<STR_LIT>" ) <EOL> @ click . option ( '<STR_LIT>' , <EOL> '<STR_LIT>' , <EOL> help = "<STR_LIT>" ) <EOL> @ environment . pass_env <EOL> def cli ( env , identifier , hardware_identifier , virtual_identifier ) : <EOL> """<STR_LIT>""" <EOL> ticket_mgr = SoftLayer . TicketManager ( env . client ) <EOL> if hardware_identifier and virtual_identifier : <EOL> raise exceptions . ArgumentError ( <EOL> "<STR_LIT>" ) <EOL> elif hardware_identifier : <EOL> hardware_mgr = SoftLayer . HardwareManager ( env . client ) <EOL> hardware_id = helpers . resolve_id ( hardware_mgr . resolve_ids , <EOL> hardware_identifier , <EOL> '<STR_LIT>' ) <EOL> ticket_mgr . detach_hardware ( identifier , hardware_id ) <EOL> elif virtual_identifier : <EOL> vs_mgr = SoftLayer . VSManager ( env . client ) <EOL> vs_id = helpers . resolve_id ( vs_mgr . resolve_ids , <EOL> virtual_identifier , <EOL> '<STR_LIT>' ) <EOL> ticket_mgr . detach_virtual_server ( identifier , vs_id ) <EOL> else : <EOL> raise exceptions . ArgumentError ( <EOL> "<STR_LIT>" ) </s>
