<commit_before>package brooklyn.location.basic.aws

import static org.jclouds.scriptbuilder.domain.Statements.*

import java.util.Collection
import java.util.Map
import java.util.concurrent.TimeUnit

import org.jclouds.compute.ComputeService
import org.jclouds.compute.RunNodesException
import org.jclouds.compute.domain.ExecResponse
import org.jclouds.compute.domain.NodeMetadata
import org.jclouds.compute.domain.Template
import org.jclouds.compute.domain.TemplateBuilder
import org.jclouds.compute.options.TemplateOptions
import org.jclouds.ec2.compute.options.EC2TemplateOptions
import org.jclouds.scriptbuilder.domain.Statement
import org.jclouds.scriptbuilder.domain.Statements

import brooklyn.location.CoordinatesProvider
import brooklyn.location.MachineProvisioningLocation
import brooklyn.location.NoMachinesAvailableException
import brooklyn.location.basic.AbstractLocation
import brooklyn.location.basic.SshMachineLocation
import brooklyn.util.internal.LanguageUtils
import brooklyn.util.internal.Repeater

import com.google.common.base.Charsets
import com.google.common.base.Throwables
import com.google.common.collect.Iterables
import com.google.common.io.Files

public class AwsLocation extends AbstractLocation implements MachineProvisioningLocation<SshMachineLocation>, CoordinatesProvider {

    public static final String ROOT_USERNAME = "root";
    public static final int START_SSHABLE_TIMEOUT = 15*60*1000;

    private final Map conf = [:];
    
    private final Map<String,Map<String, ? extends Object>> tagMapping = [:]
    private final Map<SshMachineLocation,String> vmInstanceIds = [:]

    AwsLocation(Map conf) {
        this.conf.putAll(conf)
        this.conf.provider = "aws-ec2"
    }
    
    AwsLocation(String identity, String credential, String providerLocationId) {
        this([identity:identity, credential:credential, providerLocationId:providerLocationId])
    }
    
    public void setSshPublicKey(String val) {
        conf.putAt("sshPublicKey", val)
    }
    
    public void setSshPrivateKey(String val) {
        conf.putAt("sshPrivateKey", val)
    }
    
    public void setUserName(String val) {<commit_msg>ENGR-1741: Set name for AwsLocation to region<commit_after>package brooklyn.location.basic.aws

import static org.jclouds.scriptbuilder.domain.Statements.*

import java.util.Collection
import java.util.Map
import java.util.concurrent.TimeUnit

import org.jclouds.compute.ComputeService
import org.jclouds.compute.RunNodesException
import org.jclouds.compute.domain.ExecResponse
import org.jclouds.compute.domain.NodeMetadata
import org.jclouds.compute.domain.Template
import org.jclouds.compute.domain.TemplateBuilder
import org.jclouds.compute.options.TemplateOptions
import org.jclouds.ec2.compute.options.EC2TemplateOptions
import org.jclouds.scriptbuilder.domain.Statement
import org.jclouds.scriptbuilder.domain.Statements

import brooklyn.location.CoordinatesProvider
import brooklyn.location.MachineProvisioningLocation
import brooklyn.location.NoMachinesAvailableException
import brooklyn.location.basic.AbstractLocation
import brooklyn.location.basic.SshMachineLocation
import brooklyn.util.internal.LanguageUtils
import brooklyn.util.internal.Repeater

import com.google.common.base.Charsets
import com.google.common.base.Throwables
import com.google.common.collect.Iterables
import com.google.common.io.Files

public class AwsLocation extends AbstractLocation implements MachineProvisioningLocation<SshMachineLocation>, CoordinatesProvider {

    public static final String ROOT_USERNAME = "root";
    public static final int START_SSHABLE_TIMEOUT = 15*60*1000;

    private final Map conf = [:];
    
    private final Map<String,Map<String, ? extends Object>> tagMapping = [:]
    private final Map<SshMachineLocation,String> vmInstanceIds = [:]

    AwsLocation(Map conf) {
        this.conf.putAll(conf)
        this.conf.provider = "aws-ec2"
    }
    
    AwsLocation(String identity, String credential, String providerLocationId) {
        this([identity:identity, credential:credential, providerLocationId:providerLocationId])

        name = providerLocationId
    }
    
    public void setSshPublicKey(String val) {
        conf.putAt("sshPublicKey", val)
    }
    
    public void setSshPrivateKey(String val) {
        conf.putAt("sshPrivateKey", val)
    }
    
    public void setUserName(String val) {
{'fraction_non_alphanumeric': 0.08221361876565703, 'fraction_numerical': 0.005921202459576406, 'mean_word_length': 4.919137466307277, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4640301', 'n_tokens_mistral': 1286, 'n_tokens_neox': 1256, 'n_words': 242}