Esempio n. 1
0
        public AzureTestCredentials GetCredentials(string name)
        {
            AzureTestCredentials creds = null;

            this.credentialSets.TryGetValue(name, out creds);
            return(creds);
        }
        public static AzureTestCredentials GetCredentialsForLocation(string name, string location)
        {
            AzureTestCredentials namedCreds = GetCredentials(name);

            for (int i = 0; i < namedCreds.Environments.Length; i++)
            {
                if (namedCreds.Environments[i].Location == location)
                {
                    return(CloneForEnvironment(namedCreds, i));
                }
            }
            return(null);
        }
        private static AzureTestCredentials CloneForEnvironment(AzureTestCredentials orig, int index)
        {
            var retval = new AzureTestCredentials();

            retval.AzurePassword              = orig.AzurePassword;
            retval.AzureUserName              = orig.AzureUserName;
            retval.Certificate                = orig.Certificate;
            retval.CredentialsName            = orig.CredentialsName;
            retval.HadoopUserName             = orig.HadoopUserName;
            retval.InvalidCertificate         = orig.InvalidCertificate;
            retval.SubscriptionId             = orig.SubscriptionId;
            retval.ResourceProviderProperties = orig.ResourceProviderProperties;
            retval.WellKnownCluster           = new KnownCluster
            {
                Cluster = orig.WellKnownCluster.Cluster,
                DnsName = orig.WellKnownCluster.DnsName,
                Version = orig.WellKnownCluster.Version
            };
            retval.Environments = new CreationDetails[0];
            CreationDetails env     = retval.Environments[0] = new CreationDetails();
            CreationDetails origEnv = orig.Environments[index];

            retval.CloudServiceName   = orig.CloudServiceName;
            env.DefaultStorageAccount = new StorageAccountCredentials
            {
                Container = origEnv.DefaultStorageAccount.Container,
                Key       = origEnv.DefaultStorageAccount.Key,
                Name      = origEnv.DefaultStorageAccount.Name
            };
            retval.Endpoint        = orig.Endpoint;
            env.Location           = origEnv.Location;
            retval.EnvironmentType = orig.EnvironmentType;
            var storageAccounts = new List <StorageAccountCredentials>();

            foreach (StorageAccountCredentials storageAccountCredentials in origEnv.AdditionalStorageAccounts)
            {
                var account = new StorageAccountCredentials
                {
                    Container = storageAccountCredentials.Container,
                    Key       = storageAccountCredentials.Key,
                    Name      = storageAccountCredentials.Name
                };
                storageAccounts.Add(account);
            }
            env.AdditionalStorageAccounts = storageAccounts.ToArray();
            var stores = new List <MetastoreCredentials>();

            foreach (MetastoreCredentials metastoreCredentials in origEnv.HiveStores)
            {
                var metaStore = new MetastoreCredentials
                {
                    Database    = metastoreCredentials.Database,
                    Description = metastoreCredentials.Description,
                    SqlServer   = metastoreCredentials.SqlServer
                };
            }
            env.HiveStores = stores.ToArray();
            stores.Clear();
            foreach (MetastoreCredentials metastoreCredentials in origEnv.OozieStores)
            {
                var metaStore = new MetastoreCredentials
                {
                    Database    = metastoreCredentials.Database,
                    Description = metastoreCredentials.Description,
                    SqlServer   = metastoreCredentials.SqlServer
                };
            }
            env.OozieStores = stores.ToArray();
            return(retval);
        }
Esempio n. 4
0
        private void InitializeCredentialSets()
        {
            var defaultCredentialSet = new AzureTestCredentials()
            {
                AccessToken      = Guid.NewGuid().ToString("N"),
                AzurePassword    = "******",
                AzureUserName    = "******",
                Certificate      = @"MIIKJAIBAzCCCeQGCSqGSIb3DQEHAaCCCdUEggnRMIIJzTCCBe4GCSqGSIb3DQEHAaCCBd8EggXbMIIF1zCCBdMGCyqGSIb3DQEMCgECoIIE7jCCBOowHAYKKoZIhvcNAQwBAzAOBAi3trgRTVm06gICB9AEggTIlm0GB/VlsXv0K7CYreHb8OG+QfqJFpTlZAlGZhdm3i/bdCS86gnX4+F8SfW/x4f3nPnDIW50Avf0e9uULXBPIKvLKjQJL1xSOm+R1L1LVV/g4cXuK3jjCreDJaYVhhr2cmo2mrRCmyHePED39h0oBmwABRR/b49HcUQGTYN+dgh3ZcrhfLqrePhcufCaVREepJ6KNgIjYyPxoj2CU43maNiDwS1jl2rCbSe9EwLsvabV0yngHZZKtdOtwD14f6sbTJd3IlxNR+ohQZ2sP182PhCWGavHtDPagbj0CnVNl6zVQKqjQGbide8Nu6jskQxtmcQ0OriUHTz7ZsH6dJXhLBdxY8wYzZlCooOWei58HehWacPfC2RxG2uZz5Yq1ARoU9Py+L0j5SGg6/WhZNEakRDfVtwm2ias97jy/U+534UdeQobTQeZrK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8ZgjwoyG5JEE4SE/pJBOQPmqmbys5+wXIif76TBKy8aIFv2zuMZjSdF9I0Ma6gI23jO94HGsXPin/ed2PAn9WGhaqqQ+vQ9YUnfXRq/xucQ3X550pwUdEVTlB9F7zGe4H2p8eHUqJUd8acZeghTOOJsQYfeP2al8yS9NKwQsYMjEPal8Jvf6shZJ0M0g4LwxAXFk9FUzWubNT3nYqVYOteMpCUswBW+qCwZ9fMEOV/U77ESP0IAP1Lmec2i5Az3Efj1XIDu0xJxCTY/s0ZpJeNx/kIVtlPZPFAOPh18EJk75jyAcU8JkTkKwB5Vppi0k8BRdWONkH1zTApaQxX0wO4nsN+BKL730kvI/2Hx1Hf1z7RXpTFBzjoEjFO6HkQKC63aun4JK3MO51FgxXAjgvF36PLBF2NwwHRXIChwY4NawSPfG2Vy0LXfgNU/LnSdK5TI+YvAq/Z1MWtvRcV9f5323vtieEZ2LP7xhQ5TDyEE2WJagn5GuUM5h17x2a5VhXw2tLZYyyqrdbZh/aB6qIEtbD/wrirqj2Cb/T27G1Ya4GuQRTYIzSeD1NQ0wamBZo7FlmLHRo9gwaiGK1MFZgZp/6xbdleKGCvEyvrPzhPDbkO2yuz4TyOpL5S4nmb+mEwNzAfMAcGBSsOAwIaBBSi0CmFbjfFF5eZ3Ew3lnTrOvlZRwQUx15wNo0WgvIEMjLF9YCzvK0PTXE=",
                CloudServiceName = "HDInsight",
                SubscriptionId   = new Guid("e4c4bcab-7e3b-4439-9919-d2e607f10286"),
                CredentialsName  = "default",
                Endpoint         = "https://management.core.windows.net:8443/",
                HadoopUserName   = "******",
                WellKnownCluster =
                    new KnownCluster()
                {
                    Cluster = "https://AzureHDInsightTestCluster.AzureHDInsight.net",
                    DnsName = "AzureHDInsightTestCluster",
                    Version = "1.6"
                },
                Environments = new CreationDetails[]
                {
                    new CreationDetails()
                    {
                        Location   = "East US 2",
                        HiveStores = new MetastoreCredentials[]
                        {
                            new MetastoreCredentials()
                            {
                                Database    = "Hivemetabase",
                                Description = "Hive metabase",
                                SqlServer   = "hive.sql.server.azure.net"
                            }
                        },
                        OozieStores = new MetastoreCredentials[]
                        {
                            new MetastoreCredentials()
                            {
                                Database    = "ooziemetabase",
                                Description = "oozie metabase",
                                SqlServer   = "oozie.sql.server.azure.net"
                            }
                        },
                        DefaultStorageAccount = new StorageAccountCredentials()
                        {
                            Container = "deployment1",
                            Key       = Guid.NewGuid().ToString("N"),
                            Name      = "defaultstorageaccount.blob.core.windows.net"
                        },
                        AdditionalStorageAccounts = new StorageAccountCredentials[]
                        {
                            new StorageAccountCredentials()
                            {
                                Container = "deployment1",
                                Key       = Guid.NewGuid().ToString("N"),
                                Name      = "additionaltorageaccount1.blob.core.windows.net"
                            },
                            new StorageAccountCredentials()
                            {
                                Container = "deployment1",
                                Key       = Guid.NewGuid().ToString("N"),
                                Name      = "additionaltorageaccount2.blob.core.windows.net"
                            }
                        }
                    }
                }
            };

            this.credentialSets.Add("default", defaultCredentialSet);
        }
 private static AzureTestCredentials CloneForEnvironment(AzureTestCredentials orig, int index)
 {
     var retval = new AzureTestCredentials();
     retval.AzurePassword = orig.AzurePassword;
     retval.AzureUserName = orig.AzureUserName;
     retval.Certificate = orig.Certificate;
     retval.CredentialsName = orig.CredentialsName;
     retval.HadoopUserName = orig.HadoopUserName;
     retval.InvalidCertificate = orig.InvalidCertificate;
     retval.SubscriptionId = orig.SubscriptionId;
     retval.ResourceProviderProperties = orig.ResourceProviderProperties;
     retval.WellKnownCluster = new KnownCluster
     {
         Cluster = orig.WellKnownCluster.Cluster,
         DnsName = orig.WellKnownCluster.DnsName,
         Version = orig.WellKnownCluster.Version
     };
     retval.Environments = new CreationDetails[0];
     CreationDetails env = retval.Environments[0] = new CreationDetails();
     CreationDetails origEnv = orig.Environments[index];
     retval.CloudServiceName = orig.CloudServiceName;
     env.DefaultStorageAccount = new StorageAccountCredentials
     {
         Container = origEnv.DefaultStorageAccount.Container,
         Key = origEnv.DefaultStorageAccount.Key,
         Name = origEnv.DefaultStorageAccount.Name
     };
     retval.Endpoint = orig.Endpoint;
     env.Location = origEnv.Location;
     retval.EnvironmentType = orig.EnvironmentType;
     var storageAccounts = new List<StorageAccountCredentials>();
     foreach (StorageAccountCredentials storageAccountCredentials in origEnv.AdditionalStorageAccounts)
     {
         var account = new StorageAccountCredentials
         {
             Container = storageAccountCredentials.Container,
             Key = storageAccountCredentials.Key,
             Name = storageAccountCredentials.Name
         };
         storageAccounts.Add(account);
     }
     env.AdditionalStorageAccounts = storageAccounts.ToArray();
     var stores = new List<MetastoreCredentials>();
     foreach (MetastoreCredentials metastoreCredentials in origEnv.HiveStores)
     {
         var metaStore = new MetastoreCredentials
         {
             Database = metastoreCredentials.Database,
             Description = metastoreCredentials.Description,
             SqlServer = metastoreCredentials.SqlServer
         };
     }
     env.HiveStores = stores.ToArray();
     stores.Clear();
     foreach (MetastoreCredentials metastoreCredentials in origEnv.OozieStores)
     {
         var metaStore = new MetastoreCredentials
         {
             Database = metastoreCredentials.Database,
             Description = metastoreCredentials.Description,
             SqlServer = metastoreCredentials.SqlServer
         };
     }
     env.OozieStores = stores.ToArray();
     return retval;
 }
        private void InitializeCredentialSets()
        {
            var defaultCredentialSet = new AzureTestCredentials()
            {
                AccessToken = Guid.NewGuid().ToString("N"),
                AzurePassword = "******",
                AzureUserName = "******",
                Certificate = @"MIIKJAIBAzCCCeQGCSqGSIb3DQEHAaCCCdUEggnRMIIJzTCCBe4GCSqGSIb3DQEHAaCCBd8EggXbMIIF1zCCBdMGCyqGSIb3DQEMCgECoIIE7jCCBOowHAYKKoZIhvcNAQwBAzAOBAi3trgRTVm06gICB9AEggTIlm0GB/VlsXv0K7CYreHb8OG+QfqJFpTlZAlGZhdm3i/bdCS86gnX4+F8SfW/x4f3nPnDIW50Avf0e9uULXBPIKvLKjQJL1xSOm+R1L1LVV/g4cXuK3jjCreDJaYVhhr2cmo2mrRCmyHePED39h0oBmwABRR/b49HcUQGTYN+dgh3ZcrhfLqrePhcufCaVREepJ6KNgIjYyPxoj2CU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T5Jt+ax9rq5NgQ0HrQwAbFeS+nnFABHJWFrzF79sfgT3i185ke5qYllN9ttX2Fh14HkJ/ZvlKOVsPkmEKbmWq83SQ9DNsL46ltjWB/krTWA836UVUtrXwKYRVmMKrleLNmpwKCoZ4En3G2ZHyOaRYcDGm3Sc0ZM7OgdSOnvGiOCo4FAUjV8K2ZtNAkxLJ4aoLV6qJqEaoSvNNCpBD8B8ZgjwoyG5JEE4SE/pJBOQPmqmbys5+wXIif76TBKy8aIFv2zuMZjSdF9I0Ma6gI23jO94HGsXPin/ed2PAn9WGhaqqQ+vQ9YUnfXRq/xucQ3X550pwUdEVTlB9F7zGe4H2p8eHUqJUd8acZeghTOOJsQYfeP2al8yS9NKwQsYMjEPal8Jvf6shZJ0M0g4LwxAXFk9FUzWubNT3nYqVYOteMpCUswBW+qCwZ9fMEOV/U77ESP0IAP1Lmec2i5Az3Efj1XIDu0xJxCTY/s0ZpJeNx/kIVtlPZPFAOPh18EJk75jyAcU8JkTkKwB5Vppi0k8BRdWONkH1zTApaQxX0wO4nsN+BKL730kvI/2Hx1Hf1z7RXpTFBzjoEjFO6HkQKC63aun4JK3MO51FgxXAjgvF36PLBF2NwwHRXIChwY4NawSPfG2Vy0LXfgNU/LnSdK5TI+YvAq/Z1MWtvRcV9f5323vtieEZ2LP7xhQ5TDyEE2WJagn5GuUM5h17x2a5VhXw2tLZYyyqrdbZh/aB6qIEtbD/wrirqj2Cb/T27G1Ya4GuQRTYIzSeD1NQ0wamBZo7FlmLHRo9gwaiGK1MFZgZp/6xbdleKGCvEyvrPzhPDbkO2yuz4TyOpL5S4nmb+mEwNzAfMAcGBSsOAwIaBBSi0CmFbjfFF5eZ3Ew3lnTrOvlZRwQUx15wNo0WgvIEMjLF9YCzvK0PTXE=",
                CloudServiceName = "HDInsight",
                SubscriptionId = new Guid("e4c4bcab-7e3b-4439-9919-d2e607f10286"),
                CredentialsName = "default",
                Endpoint = "https://management.core.windows.net:8443/",
                HadoopUserName = "******",
                WellKnownCluster =
                    new KnownCluster()
                    {
                        Cluster = "https://AzureHDInsightTestCluster.AzureHDInsight.net",
                        DnsName = "AzureHDInsightTestCluster",
                        Version = "1.6"
                    },
                Environments = new CreationDetails[]
                {
                    new CreationDetails()
                    {
                        Location="East US 2",
                        HiveStores = new MetastoreCredentials[]
                        {
                          new MetastoreCredentials()
                          {
                              Database = "Hivemetabase",
                              Description="Hive metabase",
                              SqlServer ="hive.sql.server.azure.net"
                          }  
                        },
                        OozieStores = new MetastoreCredentials[]
                        {
                          new MetastoreCredentials()
                          {
                              Database = "ooziemetabase",
                              Description="oozie metabase",
                              SqlServer ="oozie.sql.server.azure.net"
                          }  
                        },
                        DefaultStorageAccount = new StorageAccountCredentials()
                        {
                            Container = "deployment1",
                            Key = Guid.NewGuid().ToString("N"),
                            Name = "defaultstorageaccount.blob.core.windows.net"
                        },
                        AdditionalStorageAccounts = new StorageAccountCredentials[]
                        {
                            new StorageAccountCredentials()
                            {
                                Container = "deployment1",
                                Key = Guid.NewGuid().ToString("N"),
                                Name = "additionaltorageaccount1.blob.core.windows.net"
                            },
                            new StorageAccountCredentials()
                            {
                                Container = "deployment1",
                                Key = Guid.NewGuid().ToString("N"),
                                Name = "additionaltorageaccount2.blob.core.windows.net"
                            }
                        }
                    }
                }
            };

            this.credentialSets.Add("default", defaultCredentialSet);
        }