internal async Task<ComponentSettingAddress> GetComponentSettingAddress()
 {
     var restClient = ServiceLocator.Instance.Locate<IAzureHDInsightConfigurationRestClientFactory>().Create(this.credentials);
     var componentResponse = await restClient.GetComponentSettingsAddress();
     var converter = new PayloadConverter();
     return converter.DeSerializeComponentSettingAddresses(componentResponse.Content);
 }
示例#2
0
        public void CanDeserializeRootCall()
        {
            var converter = new PayloadConverter();
            var componentSettingsAddresses = converter.DeSerializeComponentSettingAddresses(RootCallsPayload);

            Assert.IsNotNull(componentSettingsAddresses);
            Assert.AreEqual(componentSettingsAddresses.Core.OriginalString, "https://apitestclusterrdfe19-fake.hdinsight.azure.net:563/ambari/api/v1/clusters/apitestclusterrdfe19-laureny/configurations/?type=core-site&tag=default");
            Assert.AreEqual(componentSettingsAddresses.Hive.OriginalString, "https://apitestclusterrdfe19-fake.hdinsight.azure.net:563/ambari/api/v1/clusters/apitestclusterrdfe19-laureny/configurations/?type=hive-site&tag=default");
            Assert.AreEqual(componentSettingsAddresses.Hdfs.OriginalString, "https://apitestclusterrdfe19-fake.hdinsight.azure.net:563/ambari/api/v1/clusters/apitestclusterrdfe19-laureny/configurations/?type=hdfs-site&tag=default");
            Assert.AreEqual(componentSettingsAddresses.MapReduce.OriginalString, "https://apitestclusterrdfe19-fake.hdinsight.azure.net:563/ambari/api/v1/clusters/apitestclusterrdfe19-laureny/configurations/?type=mapred-site&tag=default");
            Assert.AreEqual(componentSettingsAddresses.Oozie.OriginalString, "https://apitestclusterrdfe19-fake.hdinsight.azure.net:563/ambari/api/v1/clusters/apitestclusterrdfe19-laureny/configurations/?type=oozie-site&tag=default");
        }
 public void CanDeserializeRootCall()
 {
     var converter = new PayloadConverter();
     var componentSettingsAddresses = converter.DeSerializeComponentSettingAddresses(RootCallsPayload);
     Assert.IsNotNull(componentSettingsAddresses);
     Assert.AreEqual(componentSettingsAddresses.Core.OriginalString, "https://apitestclusterrdfe19-fake.hdinsight.azure.net:563/ambari/api/v1/clusters/apitestclusterrdfe19-laureny/configurations/?type=core-site&tag=default");
     Assert.AreEqual(componentSettingsAddresses.Hive.OriginalString, "https://apitestclusterrdfe19-fake.hdinsight.azure.net:563/ambari/api/v1/clusters/apitestclusterrdfe19-laureny/configurations/?type=hive-site&tag=default");
     Assert.AreEqual(componentSettingsAddresses.Hdfs.OriginalString, "https://apitestclusterrdfe19-fake.hdinsight.azure.net:563/ambari/api/v1/clusters/apitestclusterrdfe19-laureny/configurations/?type=hdfs-site&tag=default");
     Assert.AreEqual(componentSettingsAddresses.MapReduce.OriginalString, "https://apitestclusterrdfe19-fake.hdinsight.azure.net:563/ambari/api/v1/clusters/apitestclusterrdfe19-laureny/configurations/?type=mapred-site&tag=default");
     Assert.AreEqual(componentSettingsAddresses.Oozie.OriginalString, "https://apitestclusterrdfe19-fake.hdinsight.azure.net:563/ambari/api/v1/clusters/apitestclusterrdfe19-laureny/configurations/?type=oozie-site&tag=default");
 }