

def get_params_from_yaml(self, keyname):
    'Searches through the locations.yaml file to build a dict containing the\n    parameters necessary to interact with Amazon EC2.\n\n    Args:\n      keyname: The name of the SSH keypair that uniquely identifies this\n        AppScale deployment.\n    '
    params = {
        self.PARAM_CREDENTIALS: {
            
        },
        self.PARAM_GROUP: LocalState.get_group(keyname),
        self.PARAM_KEYNAME: keyname,
    }
    zone = LocalState.get_zone(keyname)
    if zone:
        params[self.PARAM_REGION] = zone[:(- 1)]
    else:
        params[self.PARAM_REGION] = self.DEFAULT_REGION
    for credential in self.REQUIRED_CREDENTIALS:
        if os.environ.get(credential):
            params[self.PARAM_CREDENTIALS][credential] = os.environ[credential]
        else:
            raise AgentConfigurationException(('no ' + credential))
    return params

dataset/ETHPy150Open AppScale/appscale-tools/lib/agents/ec2_agent.py EC2Agent.get_params_from_yaml/original