

def assert_required_parameters(self, parameters, operation):
    '\n    Assert that all the parameters required for the EC2 agent are in place.\n    (Also see documentation for the BaseAgent class)\n\n    Args:\n      parameters: A dictionary of parameters.\n      operation: Operations to be invoked using the above parameters.\n    '
    required_params = ()
    if (parameters == BaseAgent.OPERATION_RUN):
        required_params = self.REQUIRED_EC2_RUN_INSTANCES_PARAMS
    elif (operation == BaseAgent.OPERATION_TERMINATE):
        required_params = self.REQUIRED_EC2_TERMINATE_INSTANCES_PARAMS
    for param in required_params:
        if (not self.has_parameter(param, parameters)):
            raise AgentConfigurationException(('no ' + param))
    for credential in self.REQUIRED_EC2_CREDENTIALS:
        if (not self.has_parameter(credential, parameters['credentials'])):
            raise AgentConfigurationException(('no ' + credential))

dataset/ETHPy150Open AppScale/appscale-tools/lib/agents/ec2_agent.py EC2Agent.assert_required_parameters/VarMisuse@23/119 `operation`->`parameters`