<s> from droned . models . server import Server <EOL> from droned . models . droneserver import DroneD <EOL> from droned . models . app import App , AppVersion , AppInstance <EOL> from droned . responders import responder <EOL> @ responder ( pattern = "<STR_LIT>" , form = "<STR_LIT>" , help = "<STR_LIT>" ) <EOL> def delete ( conversation , hostname ) : <EOL> server = Server ( hostname ) <EOL> DroneD . delete ( server . droned ) <EOL> for app in list ( server . apps ) : <EOL> app . shouldRunOn . discard ( server ) <EOL> for appinstance in list ( server . appinstances ) : <EOL> AppInstance . delete ( appinstance ) <EOL> for appversion in list ( AppVersion . objects ) : <EOL> appversion . services . applicableServers . discard ( server ) <EOL> for scab in list ( server . scabs ) : <EOL> Scab . delete ( scab ) <EOL> Server . delete ( server ) <EOL> conversation . say ( "<STR_LIT>" % hostname ) <EOL> if server . listed : <EOL> conversation . say ( "<STR_LIT>" ) </s>
