

def cleanup_state(self, parameters):
    ' Removes the keyname and security group created during this AppScale\n    deployment.\n\n    Args:\n      parameters: A dict that contains the keyname and security group to delete.\n    '
    AppScaleLogger.log('Deleting keyname {0}'.format(parameters[self.PARAM_KEYNAME]))
    conn = self.open_connection(parameters)
    self.delete_key_pair(parameters[self.PARAM_KEYNAME])
    AppScaleLogger.log('Deleting security group {0}'.format(parameters[self.PARAM_GROUP]))
    while True:
        try:
            conn.delete_security_group(parameters[self.PARAM_GROUP])
            return
        except EC2ResponseError:
            time.sleep(5)

dataset/ETHPy150Open AppScale/appscale-tools/lib/agents/ec2_agent.py EC2Agent.cleanup_state/VarMisuse@40/119 `conn`->`self`