Exemplo n.º 1
0
 public async Task Setup()
 {
     ArmClient = GetArmClient();
     _notificationHubsResourceId       = TestEnvironment.NotificationHubsResourceId;
     _notificationHubsConnectionString = TestEnvironment.NotificationHubsConnectionString;
     _resourceGroup = await ArmClient.GetResourceGroup(_resourceGroupIdentifier).GetAsync();
 }
Exemplo n.º 2
0
        public async Task SetUp()
        {
            // need to overwrite with the resource group fetched by ArmClient, otherwise it won't be recorded
            _resourceGroup = await ArmClient.GetResourceGroup(_resourceGroupIdentifier).GetAsync();

            _databaseAccount = await ArmClient.GetDatabaseAccount(_databaseAccountIdentifier).GetAsync();
        }
Exemplo n.º 3
0
        public DeploymentCollection GetDeploymentCollection(ArmClient armClient, ResourceIdentifier resourceIdentifier, string scope)
        {
            switch (scope)
            {
            case LanguageConstants.TargetScopeTypeResourceGroup:
                var resourceGroup = armClient.GetResourceGroup(resourceIdentifier);
                return(resourceGroup.GetDeployments());

            case LanguageConstants.TargetScopeTypeSubscription:
                var subscription = armClient.GetSubscription(resourceIdentifier);
                return(subscription.GetDeployments());

            case LanguageConstants.TargetScopeTypeManagementGroup:
                var managementGroup = armClient.GetManagementGroup(resourceIdentifier);
                return(managementGroup.GetDeployments());

            default:
                throw new Exception(string.Format(LangServerResources.UnsupportedTargetScopeMessage, scope));
            }
        }
Exemplo n.º 4
0
 public async Task TestSetup()
 {
     _resourceGroup = await ArmClient.GetResourceGroup(_resourceGroupIdentifier).GetAsync();
 }
Exemplo n.º 5
0
 public async Task SetUp()
 {
     ArmClient      = GetArmClient();
     _resourceGroup = await ArmClient.GetResourceGroup(_resourceGroupIdentifier).GetAsync();
 }