

def create_security_group(self, parameters, group):
    'Creates a new security group in AWS with the given name.\n\n    Args:\n      parameters: A dict that contains the credentials necessary to authenticate\n        with AWS.\n      group: A str that names the group that should be created.\n    Raises:\n      AgentRuntimeException: If the security group could not be created.\n    '
    AppScaleLogger.log('Creating security group: {0}'.format(group))
    conn = self.open_connection(parameters)
    retries_left = self.SECURITY_GROUP_RETRY_COUNT
    while retries_left:
        try:
            conn.create_security_group(group, 'AppScale security group')
        except EC2ResponseError:
            pass
        try:
            self.get_all_security_groups(group)
            return
        except EC2ResponseError:
            pass
        time.sleep(self.SLEEP_TIME)
        retries_left -= 1
    raise AgentRuntimeException("Couldn't create security group with name {0}".format(group))

dataset/ETHPy150Open AppScale/appscale-tools/lib/agents/ec2_agent.py EC2Agent.create_security_group/VarMisuse@74/229 `conn`->`self`