protected FlexibleServersModels.Server CreateMySQLFlexibleServersInstance(MockContext context,
                                                                           MySQLManagementClient client,
                                                                           ResourceGroup resourceGroup,
                                                                           string serverName)
 {
     return(client.Servers.Create(
                resourceGroup.Name,
                serverName,
                new FlexibleServersModels.Server(location: resourceGroup.Location,
                                                 sku: new FlexibleServersModels.Sku("Standard_B1ms", "Burstable"),
                                                 administratorLogin: "******",
                                                 administratorLoginPassword: "******",
                                                 version: "5.7",
                                                 storage: new FlexibleServersModels.Storage(storageSizeGB: 512))));
 }
 protected Server CreateMySQLInstance(MockContext context,
                                      MySQLManagementClient client,
                                      ResourceGroup resourceGroup,
                                      string serverName)
 {
     return(client.Servers.Create(
                resourceGroup.Name,
                serverName,
                new ServerForCreate(
                    properties: new ServerPropertiesForDefaultCreate(
                        administratorLogin: "******",
                        administratorLoginPassword: "******"),
                    location: resourceGroup.Location,
                    sku: new Microsoft.Azure.Management.MySQL.Models.Sku(name: "B_Gen5_1"))));
 }
 protected FlexibleServersModels.Server CreateMySQLFlexibleServersInstance(MockContext context,
                                                                           MySQLManagementClient client,
                                                                           ResourceGroup resourceGroup,
                                                                           string serverName)
 {
     return(client.Servers.Create(
                resourceGroup.Name,
                serverName,
                new FlexibleServersModels.Server(location: resourceGroup.Location,
                                                 sku: new FlexibleServersModels.Sku("Standard_D4s_v3", "GeneralPurpose"),
                                                 administratorLogin: "******",
                                                 administratorLoginPassword: "******",
                                                 version: "5.7",
                                                 storageProfile: new FlexibleServersModels.StorageProfile(storageMB: 524288))));
 }
示例#4
0
        public static MySQLManagementClient GetMySQLManagementClient(MockContext context, RecordedDelegatingHandler handler)
        {
            MySQLManagementClient dmClient;

            if (IsTestTenant)
            {
                dmClient = new MySQLManagementClient(new TokenCredentials("xyz"), GetHandler());
                dmClient.SubscriptionId = testSubscription;
                dmClient.BaseUri        = testUri;
            }
            else
            {
                handler.IsPassThrough = true;
                dmClient = context.GetServiceClient <MySQLManagementClient>(handlers: handler);
            }
            return(dmClient);
        }