From 2ebd0730e87707007ed1ed91b9c10b9ae747f151 Mon Sep 17 00:00:00 2001 From: Matthew Christopher Date: Thu, 17 Feb 2022 17:25:33 -0800 Subject: [PATCH] Add Redis secrets extension (#2101) --- .../cache/customizations/redis_extensions.go | 123 ++ .../redis_resource__status_arm_types_gen.go | 11 - ...dis_resource__status_arm_types_gen_test.go | 62 - .../v1alpha1api20201201/redis_types_gen.go | 319 ++-- .../redis_types_gen_test.go | 276 ++-- .../zz_generated.deepcopy.go | 125 +- .../redis_types_gen.go | 36 +- .../redis_types_gen_test.go | 176 +- .../zz_generated.deepcopy.go | 116 +- v2/api/cache/versions_matrix.md | 1 - v2/azure-arm.yaml | 11 + v2/go.mod | 1 + v2/go.sum | 5 +- .../controllers/crd_cache_redis_test.go | 95 ++ .../Test_Cache_Redis_SecretsFromAzure.yaml | 1433 +++++++++++++++++ 15 files changed, 2336 insertions(+), 454 deletions(-) create mode 100644 v2/api/cache/customizations/redis_extensions.go create mode 100644 v2/internal/controllers/recordings/Test_Cache_Redis_SecretsFromAzure.yaml diff --git a/v2/api/cache/customizations/redis_extensions.go b/v2/api/cache/customizations/redis_extensions.go new file mode 100644 index 00000000000..64772325f40 --- /dev/null +++ b/v2/api/cache/customizations/redis_extensions.go @@ -0,0 +1,123 @@ +/* + * Copyright (c) Microsoft Corporation. + * Licensed under the MIT license. + */ + +package customizations + +import ( + "context" + "strconv" + + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis" + "github.com/Azure/go-autorest/autorest/to" + "github.com/go-logr/logr" + "github.com/pkg/errors" + "k8s.io/api/core/v1" + "sigs.k8s.io/controller-runtime/pkg/conversion" + + redis "github.com/Azure/azure-service-operator/v2/api/cache/v1alpha1api20201201storage" + "github.com/Azure/azure-service-operator/v2/internal/genericarmclient" + . "github.com/Azure/azure-service-operator/v2/internal/logging" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/extensions" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime/secrets" +) + +var _ extensions.SecretsRetriever = &RedisExtension{} + +func (ext *RedisExtension) RetrieveSecrets( + ctx context.Context, + obj genruntime.MetaObject, + armClient *genericarmclient.GenericClient, + log logr.Logger) ([]*v1.Secret, error) { + + typedObj, ok := obj.(*redis.Redis) + if !ok { + return nil, errors.Errorf("cannot run on unknown resource type %T", obj) + } + + // Type assert that we are the hub type. This should fail to compile if + // the hub type has been changed but this extension has not + var _ conversion.Hub = typedObj + + hasSecrets, hasEndpoints := secretsSpecified(typedObj) + if !hasSecrets && !hasEndpoints { + log.V(Debug).Info("No secrets retrieval to perform as operatorSpec is empty") + return nil, nil + } + + id, err := genruntime.GetAndParseResourceID(obj) + if err != nil { + return nil, err + } + + var accessKeys armredis.AccessKeys + // Only bother calling ListKeys if there are secrets to retrieve + if hasSecrets { + subscription := armClient.SubscriptionID() + // Using armClient.ClientOptions() here ensures we share the same HTTP connection, so this is not opening a new + // connection each time through + redisClient := armredis.NewClient(subscription, armClient.Creds(), armClient.ClientOptions()) + + var resp armredis.ClientListKeysResponse + resp, err = redisClient.ListKeys(ctx, id.ResourceGroupName, obj.AzureName(), nil) + if err != nil { + return nil, errors.Wrapf(err, "failed listing keys") + } + accessKeys = resp.AccessKeys + } + secretSlice, err := secretsToWrite(typedObj, accessKeys) + if err != nil { + return nil, err + } + + return secretSlice, nil +} + +func secretsSpecified(obj *redis.Redis) (bool, bool) { + if obj.Spec.OperatorSpec == nil || obj.Spec.OperatorSpec.Secrets == nil { + return false, false + } + + secrets := obj.Spec.OperatorSpec.Secrets + hasSecrets := false + hasEndpoints := false + + if secrets.PrimaryKey != nil || + secrets.SecondaryKey != nil { + hasSecrets = true + } + + if secrets.HostName != nil || + secrets.Port != nil || + secrets.SSLPort != nil { + hasEndpoints = true + } + + return hasSecrets, hasEndpoints +} + +func secretsToWrite(obj *redis.Redis, accessKeys armredis.AccessKeys) ([]*v1.Secret, error) { + operatorSpecSecrets := obj.Spec.OperatorSpec.Secrets + if operatorSpecSecrets == nil { + return nil, errors.Errorf("unexpected nil operatorspec") + } + + collector := secrets.NewSecretCollector(obj.Namespace) + collector.AddSecretValue(operatorSpecSecrets.PrimaryKey, to.String(accessKeys.PrimaryKey)) + collector.AddSecretValue(operatorSpecSecrets.SecondaryKey, to.String(accessKeys.SecondaryKey)) + collector.AddSecretValue(operatorSpecSecrets.HostName, to.String(obj.Status.HostName)) + collector.AddSecretValue(operatorSpecSecrets.Port, intPtrToString(obj.Status.Port)) + collector.AddSecretValue(operatorSpecSecrets.SSLPort, intPtrToString(obj.Status.SslPort)) + + return collector.Secrets(), nil +} + +func intPtrToString(i *int) string { + if i == nil { + return "" + } + + return strconv.Itoa(*i) +} diff --git a/v2/api/cache/v1alpha1api20201201/redis_resource__status_arm_types_gen.go b/v2/api/cache/v1alpha1api20201201/redis_resource__status_arm_types_gen.go index 757fa5df0bf..6db64f72b08 100644 --- a/v2/api/cache/v1alpha1api20201201/redis_resource__status_arm_types_gen.go +++ b/v2/api/cache/v1alpha1api20201201/redis_resource__status_arm_types_gen.go @@ -28,9 +28,6 @@ type RedisResource_StatusARM struct { } type RedisProperties_StatusARM struct { - //AccessKeys: The keys of the Redis cache - not set if this object is not the response to Create or Update redis cache - AccessKeys *RedisAccessKeys_StatusARM `json:"accessKeys,omitempty"` - //EnableNonSslPort: Specifies whether the non-ssl Redis server port (6379) is enabled. EnableNonSslPort *bool `json:"enableNonSslPort,omitempty"` @@ -102,14 +99,6 @@ type PrivateEndpointConnection_Status_SubResourceEmbeddedARM struct { Id *string `json:"id,omitempty"` } -type RedisAccessKeys_StatusARM struct { - //PrimaryKey: The current primary key that clients can use to authenticate with Redis cache. - PrimaryKey *string `json:"primaryKey,omitempty"` - - //SecondaryKey: The current secondary key that clients can use to authenticate with Redis cache. - SecondaryKey *string `json:"secondaryKey,omitempty"` -} - type RedisInstanceDetails_StatusARM struct { //IsMaster: Specifies whether the instance is a primary node. IsMaster *bool `json:"isMaster,omitempty"` diff --git a/v2/api/cache/v1alpha1api20201201/redis_resource__status_arm_types_gen_test.go b/v2/api/cache/v1alpha1api20201201/redis_resource__status_arm_types_gen_test.go index 09805beb59b..6a05391bd18 100644 --- a/v2/api/cache/v1alpha1api20201201/redis_resource__status_arm_types_gen_test.go +++ b/v2/api/cache/v1alpha1api20201201/redis_resource__status_arm_types_gen_test.go @@ -193,7 +193,6 @@ func AddIndependentPropertyGeneratorsForRedisPropertiesStatusARM(gens map[string // AddRelatedPropertyGeneratorsForRedisPropertiesStatusARM is a factory method for creating gopter generators func AddRelatedPropertyGeneratorsForRedisPropertiesStatusARM(gens map[string]gopter.Gen) { - gens["AccessKeys"] = gen.PtrOf(RedisAccessKeysStatusARMGenerator()) gens["Instances"] = gen.SliceOf(RedisInstanceDetailsStatusARMGenerator()) gens["LinkedServers"] = gen.SliceOf(RedisLinkedServerStatusARMGenerator()) gens["PrivateEndpointConnections"] = gen.SliceOf(PrivateEndpointConnectionStatusSubResourceEmbeddedARMGenerator()) @@ -260,67 +259,6 @@ func AddIndependentPropertyGeneratorsForPrivateEndpointConnectionStatusSubResour gens["Id"] = gen.PtrOf(gen.AlphaString()) } -func Test_RedisAccessKeys_StatusARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of RedisAccessKeys_StatusARM via JSON returns original", - prop.ForAll(RunJSONSerializationTestForRedisAccessKeysStatusARM, RedisAccessKeysStatusARMGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForRedisAccessKeysStatusARM runs a test to see if a specific instance of RedisAccessKeys_StatusARM round trips to JSON and back losslessly -func RunJSONSerializationTestForRedisAccessKeysStatusARM(subject RedisAccessKeys_StatusARM) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual RedisAccessKeys_StatusARM - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of RedisAccessKeys_StatusARM instances for property testing - lazily instantiated by -//RedisAccessKeysStatusARMGenerator() -var redisAccessKeysStatusARMGenerator gopter.Gen - -// RedisAccessKeysStatusARMGenerator returns a generator of RedisAccessKeys_StatusARM instances for property testing. -func RedisAccessKeysStatusARMGenerator() gopter.Gen { - if redisAccessKeysStatusARMGenerator != nil { - return redisAccessKeysStatusARMGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForRedisAccessKeysStatusARM(generators) - redisAccessKeysStatusARMGenerator = gen.Struct(reflect.TypeOf(RedisAccessKeys_StatusARM{}), generators) - - return redisAccessKeysStatusARMGenerator -} - -// AddIndependentPropertyGeneratorsForRedisAccessKeysStatusARM is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForRedisAccessKeysStatusARM(gens map[string]gopter.Gen) { - gens["PrimaryKey"] = gen.PtrOf(gen.AlphaString()) - gens["SecondaryKey"] = gen.PtrOf(gen.AlphaString()) -} - func Test_RedisInstanceDetails_StatusARM_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() diff --git a/v2/api/cache/v1alpha1api20201201/redis_types_gen.go b/v2/api/cache/v1alpha1api20201201/redis_types_gen.go index 5b342dd1b7e..aa704171ca0 100644 --- a/v2/api/cache/v1alpha1api20201201/redis_types_gen.go +++ b/v2/api/cache/v1alpha1api20201201/redis_types_gen.go @@ -308,9 +308,6 @@ type RedisList struct { } type RedisResource_Status struct { - //AccessKeys: The keys of the Redis cache - not set if this object is not the response to Create or Update redis cache - AccessKeys *RedisAccessKeys_Status `json:"accessKeys,omitempty"` - //Conditions: The observed state of the resource Conditions []conditions.Condition `json:"conditions,omitempty"` @@ -462,20 +459,6 @@ func (resource *RedisResource_Status) PopulateFromARM(owner genruntime.Arbitrary return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected RedisResource_StatusARM, got %T", armInput) } - // Set property ‘AccessKeys’: - // copying flattened property: - if typedInput.Properties != nil { - if typedInput.Properties.AccessKeys != nil { - var accessKeys1 RedisAccessKeys_Status - err := accessKeys1.PopulateFromARM(owner, *typedInput.Properties.AccessKeys) - if err != nil { - return err - } - accessKeys := accessKeys1 - resource.AccessKeys = &accessKeys - } - } - // no assignment for property ‘Conditions’ // Set property ‘EnableNonSslPort’: @@ -713,18 +696,6 @@ func (resource *RedisResource_Status) PopulateFromARM(owner genruntime.Arbitrary // AssignPropertiesFromRedisResourceStatus populates our RedisResource_Status from the provided source RedisResource_Status func (resource *RedisResource_Status) AssignPropertiesFromRedisResourceStatus(source *v1alpha1api20201201storage.RedisResource_Status) error { - // AccessKeys - if source.AccessKeys != nil { - var accessKey RedisAccessKeys_Status - err := accessKey.AssignPropertiesFromRedisAccessKeysStatus(source.AccessKeys) - if err != nil { - return errors.Wrap(err, "calling AssignPropertiesFromRedisAccessKeysStatus() to populate field AccessKeys") - } - resource.AccessKeys = &accessKey - } else { - resource.AccessKeys = nil - } - // Conditions resource.Conditions = genruntime.CloneSliceOfCondition(source.Conditions) @@ -886,18 +857,6 @@ func (resource *RedisResource_Status) AssignPropertiesToRedisResourceStatus(dest // Create a new property bag propertyBag := genruntime.NewPropertyBag() - // AccessKeys - if resource.AccessKeys != nil { - var accessKey v1alpha1api20201201storage.RedisAccessKeys_Status - err := resource.AccessKeys.AssignPropertiesToRedisAccessKeysStatus(&accessKey) - if err != nil { - return errors.Wrap(err, "calling AssignPropertiesToRedisAccessKeysStatus() to populate field AccessKeys") - } - destination.AccessKeys = &accessKey - } else { - destination.AccessKeys = nil - } - // Conditions destination.Conditions = genruntime.CloneSliceOfCondition(resource.Conditions) @@ -1081,6 +1040,10 @@ type Redis_Spec struct { //'1.2'). MinimumTlsVersion *RedisCreatePropertiesMinimumTlsVersion `json:"minimumTlsVersion,omitempty"` + //OperatorSpec: The specification for configuring operator behavior. This field is interpreted by the operator and not + //passed directly to Azure + OperatorSpec *RedisOperatorSpec `json:"operatorSpec,omitempty"` + // +kubebuilder:validation:Required Owner genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner" kind:"ResourceGroup"` @@ -1250,6 +1213,8 @@ func (redis *Redis_Spec) PopulateFromARM(owner genruntime.ArbitraryOwnerReferenc redis.MinimumTlsVersion = &minimumTlsVersion } + // no assignment for property ‘OperatorSpec’ + // Set property ‘Owner’: redis.Owner = genruntime.KnownResourceReference{ Name: owner.Name, @@ -1418,6 +1383,18 @@ func (redis *Redis_Spec) AssignPropertiesFromRedisSpec(source *v1alpha1api202012 redis.MinimumTlsVersion = nil } + // OperatorSpec + if source.OperatorSpec != nil { + var operatorSpec RedisOperatorSpec + err := operatorSpec.AssignPropertiesFromRedisOperatorSpec(source.OperatorSpec) + if err != nil { + return errors.Wrap(err, "calling AssignPropertiesFromRedisOperatorSpec() to populate field OperatorSpec") + } + redis.OperatorSpec = &operatorSpec + } else { + redis.OperatorSpec = nil + } + // Owner redis.Owner = source.Owner.Copy() @@ -1513,6 +1490,18 @@ func (redis *Redis_Spec) AssignPropertiesToRedisSpec(destination *v1alpha1api202 destination.MinimumTlsVersion = nil } + // OperatorSpec + if redis.OperatorSpec != nil { + var operatorSpec v1alpha1api20201201storage.RedisOperatorSpec + err := redis.OperatorSpec.AssignPropertiesToRedisOperatorSpec(&operatorSpec) + if err != nil { + return errors.Wrap(err, "calling AssignPropertiesToRedisOperatorSpec() to populate field OperatorSpec") + } + destination.OperatorSpec = &operatorSpec + } else { + destination.OperatorSpec = nil + } + // OriginalVersion destination.OriginalVersion = redis.OriginalVersion() @@ -1653,79 +1642,6 @@ func (embedded *PrivateEndpointConnection_Status_SubResourceEmbedded) AssignProp return nil } -type RedisAccessKeys_Status struct { - //PrimaryKey: The current primary key that clients can use to authenticate with Redis cache. - PrimaryKey *string `json:"primaryKey,omitempty"` - - //SecondaryKey: The current secondary key that clients can use to authenticate with Redis cache. - SecondaryKey *string `json:"secondaryKey,omitempty"` -} - -var _ genruntime.FromARMConverter = &RedisAccessKeys_Status{} - -// NewEmptyARMValue returns an empty ARM value suitable for deserializing into -func (keys *RedisAccessKeys_Status) NewEmptyARMValue() genruntime.ARMResourceStatus { - return &RedisAccessKeys_StatusARM{} -} - -// PopulateFromARM populates a Kubernetes CRD object from an Azure ARM object -func (keys *RedisAccessKeys_Status) PopulateFromARM(owner genruntime.ArbitraryOwnerReference, armInput interface{}) error { - typedInput, ok := armInput.(RedisAccessKeys_StatusARM) - if !ok { - return fmt.Errorf("unexpected type supplied for PopulateFromARM() function. Expected RedisAccessKeys_StatusARM, got %T", armInput) - } - - // Set property ‘PrimaryKey’: - if typedInput.PrimaryKey != nil { - primaryKey := *typedInput.PrimaryKey - keys.PrimaryKey = &primaryKey - } - - // Set property ‘SecondaryKey’: - if typedInput.SecondaryKey != nil { - secondaryKey := *typedInput.SecondaryKey - keys.SecondaryKey = &secondaryKey - } - - // No error - return nil -} - -// AssignPropertiesFromRedisAccessKeysStatus populates our RedisAccessKeys_Status from the provided source RedisAccessKeys_Status -func (keys *RedisAccessKeys_Status) AssignPropertiesFromRedisAccessKeysStatus(source *v1alpha1api20201201storage.RedisAccessKeys_Status) error { - - // PrimaryKey - keys.PrimaryKey = genruntime.ClonePointerToString(source.PrimaryKey) - - // SecondaryKey - keys.SecondaryKey = genruntime.ClonePointerToString(source.SecondaryKey) - - // No error - return nil -} - -// AssignPropertiesToRedisAccessKeysStatus populates the provided destination RedisAccessKeys_Status from our RedisAccessKeys_Status -func (keys *RedisAccessKeys_Status) AssignPropertiesToRedisAccessKeysStatus(destination *v1alpha1api20201201storage.RedisAccessKeys_Status) error { - // Create a new property bag - propertyBag := genruntime.NewPropertyBag() - - // PrimaryKey - destination.PrimaryKey = genruntime.ClonePointerToString(keys.PrimaryKey) - - // SecondaryKey - destination.SecondaryKey = genruntime.ClonePointerToString(keys.SecondaryKey) - - // Update the property bag - if len(propertyBag) > 0 { - destination.PropertyBag = propertyBag - } else { - destination.PropertyBag = nil - } - - // No error - return nil -} - // +kubebuilder:validation:Enum={"1.0","1.1","1.2"} type RedisCreatePropertiesMinimumTlsVersion string @@ -1954,6 +1870,59 @@ func (server *RedisLinkedServer_Status) AssignPropertiesToRedisLinkedServerStatu return nil } +//Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure +type RedisOperatorSpec struct { + //Secrets: configures where to place Azure generated secrets. + Secrets *RedisOperatorSecrets `json:"secrets,omitempty"` +} + +// AssignPropertiesFromRedisOperatorSpec populates our RedisOperatorSpec from the provided source RedisOperatorSpec +func (operator *RedisOperatorSpec) AssignPropertiesFromRedisOperatorSpec(source *v1alpha1api20201201storage.RedisOperatorSpec) error { + + // Secrets + if source.Secrets != nil { + var secret RedisOperatorSecrets + err := secret.AssignPropertiesFromRedisOperatorSecrets(source.Secrets) + if err != nil { + return errors.Wrap(err, "calling AssignPropertiesFromRedisOperatorSecrets() to populate field Secrets") + } + operator.Secrets = &secret + } else { + operator.Secrets = nil + } + + // No error + return nil +} + +// AssignPropertiesToRedisOperatorSpec populates the provided destination RedisOperatorSpec from our RedisOperatorSpec +func (operator *RedisOperatorSpec) AssignPropertiesToRedisOperatorSpec(destination *v1alpha1api20201201storage.RedisOperatorSpec) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // Secrets + if operator.Secrets != nil { + var secret v1alpha1api20201201storage.RedisOperatorSecrets + err := operator.Secrets.AssignPropertiesToRedisOperatorSecrets(&secret) + if err != nil { + return errors.Wrap(err, "calling AssignPropertiesToRedisOperatorSecrets() to populate field Secrets") + } + destination.Secrets = &secret + } else { + destination.Secrets = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + type RedisPropertiesStatusMinimumTlsVersion string const ( @@ -2193,6 +2162,128 @@ func (sku *Sku_Status) AssignPropertiesToSkuStatus(destination *v1alpha1api20201 return nil } +type RedisOperatorSecrets struct { + //HostName: indicates where the HostName secret should be placed. If omitted, the secret will not be retrieved from Azure. + HostName *genruntime.SecretDestination `json:"hostName,omitempty"` + + //Port: indicates where the Port secret should be placed. If omitted, the secret will not be retrieved from Azure. + Port *genruntime.SecretDestination `json:"port,omitempty"` + + //PrimaryKey: indicates where the PrimaryKey secret should be placed. If omitted, the secret will not be retrieved from + //Azure. + PrimaryKey *genruntime.SecretDestination `json:"primaryKey,omitempty"` + + //SSLPort: indicates where the SSLPort secret should be placed. If omitted, the secret will not be retrieved from Azure. + SSLPort *genruntime.SecretDestination `json:"sslPort,omitempty"` + + //SecondaryKey: indicates where the SecondaryKey secret should be placed. If omitted, the secret will not be retrieved + //from Azure. + SecondaryKey *genruntime.SecretDestination `json:"secondaryKey,omitempty"` +} + +// AssignPropertiesFromRedisOperatorSecrets populates our RedisOperatorSecrets from the provided source RedisOperatorSecrets +func (secrets *RedisOperatorSecrets) AssignPropertiesFromRedisOperatorSecrets(source *v1alpha1api20201201storage.RedisOperatorSecrets) error { + + // HostName + if source.HostName != nil { + hostName := source.HostName.Copy() + secrets.HostName = &hostName + } else { + secrets.HostName = nil + } + + // Port + if source.Port != nil { + port := source.Port.Copy() + secrets.Port = &port + } else { + secrets.Port = nil + } + + // PrimaryKey + if source.PrimaryKey != nil { + primaryKey := source.PrimaryKey.Copy() + secrets.PrimaryKey = &primaryKey + } else { + secrets.PrimaryKey = nil + } + + // SSLPort + if source.SSLPort != nil { + sslPort := source.SSLPort.Copy() + secrets.SSLPort = &sslPort + } else { + secrets.SSLPort = nil + } + + // SecondaryKey + if source.SecondaryKey != nil { + secondaryKey := source.SecondaryKey.Copy() + secrets.SecondaryKey = &secondaryKey + } else { + secrets.SecondaryKey = nil + } + + // No error + return nil +} + +// AssignPropertiesToRedisOperatorSecrets populates the provided destination RedisOperatorSecrets from our RedisOperatorSecrets +func (secrets *RedisOperatorSecrets) AssignPropertiesToRedisOperatorSecrets(destination *v1alpha1api20201201storage.RedisOperatorSecrets) error { + // Create a new property bag + propertyBag := genruntime.NewPropertyBag() + + // HostName + if secrets.HostName != nil { + hostName := secrets.HostName.Copy() + destination.HostName = &hostName + } else { + destination.HostName = nil + } + + // Port + if secrets.Port != nil { + port := secrets.Port.Copy() + destination.Port = &port + } else { + destination.Port = nil + } + + // PrimaryKey + if secrets.PrimaryKey != nil { + primaryKey := secrets.PrimaryKey.Copy() + destination.PrimaryKey = &primaryKey + } else { + destination.PrimaryKey = nil + } + + // SSLPort + if secrets.SSLPort != nil { + sslPort := secrets.SSLPort.Copy() + destination.SSLPort = &sslPort + } else { + destination.SSLPort = nil + } + + // SecondaryKey + if secrets.SecondaryKey != nil { + secondaryKey := secrets.SecondaryKey.Copy() + destination.SecondaryKey = &secondaryKey + } else { + destination.SecondaryKey = nil + } + + // Update the property bag + if len(propertyBag) > 0 { + destination.PropertyBag = propertyBag + } else { + destination.PropertyBag = nil + } + + // No error + return nil +} + // +kubebuilder:validation:Enum={"C","P"} type SkuFamily string diff --git a/v2/api/cache/v1alpha1api20201201/redis_types_gen_test.go b/v2/api/cache/v1alpha1api20201201/redis_types_gen_test.go index 24f24bbffd8..d30d4c1df18 100644 --- a/v2/api/cache/v1alpha1api20201201/redis_types_gen_test.go +++ b/v2/api/cache/v1alpha1api20201201/redis_types_gen_test.go @@ -307,7 +307,6 @@ func AddIndependentPropertyGeneratorsForRedisResourceStatus(gens map[string]gopt // AddRelatedPropertyGeneratorsForRedisResourceStatus is a factory method for creating gopter generators func AddRelatedPropertyGeneratorsForRedisResourceStatus(gens map[string]gopter.Gen) { - gens["AccessKeys"] = gen.PtrOf(RedisAccessKeysStatusGenerator()) gens["Instances"] = gen.SliceOf(RedisInstanceDetailsStatusGenerator()) gens["LinkedServers"] = gen.SliceOf(RedisLinkedServerStatusGenerator()) gens["PrivateEndpointConnections"] = gen.SliceOf(PrivateEndpointConnectionStatusSubResourceEmbeddedGenerator()) @@ -439,6 +438,7 @@ func AddIndependentPropertyGeneratorsForRedisSpec(gens map[string]gopter.Gen) { // AddRelatedPropertyGeneratorsForRedisSpec is a factory method for creating gopter generators func AddRelatedPropertyGeneratorsForRedisSpec(gens map[string]gopter.Gen) { + gens["OperatorSpec"] = gen.PtrOf(RedisOperatorSpecGenerator()) gens["Sku"] = SkuGenerator() } @@ -544,32 +544,32 @@ func AddIndependentPropertyGeneratorsForPrivateEndpointConnectionStatusSubResour gens["Id"] = gen.PtrOf(gen.AlphaString()) } -func Test_RedisAccessKeys_Status_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { +func Test_RedisInstanceDetails_Status_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() parameters.MaxSize = 10 properties := gopter.NewProperties(parameters) properties.Property( - "Round trip from RedisAccessKeys_Status to RedisAccessKeys_Status via AssignPropertiesToRedisAccessKeysStatus & AssignPropertiesFromRedisAccessKeysStatus returns original", - prop.ForAll(RunPropertyAssignmentTestForRedisAccessKeysStatus, RedisAccessKeysStatusGenerator())) + "Round trip from RedisInstanceDetails_Status to RedisInstanceDetails_Status via AssignPropertiesToRedisInstanceDetailsStatus & AssignPropertiesFromRedisInstanceDetailsStatus returns original", + prop.ForAll(RunPropertyAssignmentTestForRedisInstanceDetailsStatus, RedisInstanceDetailsStatusGenerator())) properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) } -// RunPropertyAssignmentTestForRedisAccessKeysStatus tests if a specific instance of RedisAccessKeys_Status can be assigned to v1alpha1api20201201storage and back losslessly -func RunPropertyAssignmentTestForRedisAccessKeysStatus(subject RedisAccessKeys_Status) string { +// RunPropertyAssignmentTestForRedisInstanceDetailsStatus tests if a specific instance of RedisInstanceDetails_Status can be assigned to v1alpha1api20201201storage and back losslessly +func RunPropertyAssignmentTestForRedisInstanceDetailsStatus(subject RedisInstanceDetails_Status) string { // Copy subject to make sure assignment doesn't modify it copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v1alpha1api20201201storage.RedisAccessKeys_Status - err := copied.AssignPropertiesToRedisAccessKeysStatus(&other) + var other v1alpha1api20201201storage.RedisInstanceDetails_Status + err := copied.AssignPropertiesToRedisInstanceDetailsStatus(&other) if err != nil { return err.Error() } // Use AssignPropertiesFrom() to convert back to our original type - var actual RedisAccessKeys_Status - err = actual.AssignPropertiesFromRedisAccessKeysStatus(&other) + var actual RedisInstanceDetails_Status + err = actual.AssignPropertiesFromRedisInstanceDetailsStatus(&other) if err != nil { return err.Error() } @@ -586,19 +586,19 @@ func RunPropertyAssignmentTestForRedisAccessKeysStatus(subject RedisAccessKeys_S return "" } -func Test_RedisAccessKeys_Status_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { +func Test_RedisInstanceDetails_Status_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() parameters.MaxSize = 10 properties := gopter.NewProperties(parameters) properties.Property( - "Round trip of RedisAccessKeys_Status via JSON returns original", - prop.ForAll(RunJSONSerializationTestForRedisAccessKeysStatus, RedisAccessKeysStatusGenerator())) + "Round trip of RedisInstanceDetails_Status via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRedisInstanceDetailsStatus, RedisInstanceDetailsStatusGenerator())) properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) } -// RunJSONSerializationTestForRedisAccessKeysStatus runs a test to see if a specific instance of RedisAccessKeys_Status round trips to JSON and back losslessly -func RunJSONSerializationTestForRedisAccessKeysStatus(subject RedisAccessKeys_Status) string { +// RunJSONSerializationTestForRedisInstanceDetailsStatus runs a test to see if a specific instance of RedisInstanceDetails_Status round trips to JSON and back losslessly +func RunJSONSerializationTestForRedisInstanceDetailsStatus(subject RedisInstanceDetails_Status) string { // Serialize to JSON bin, err := json.Marshal(subject) if err != nil { @@ -606,7 +606,7 @@ func RunJSONSerializationTestForRedisAccessKeysStatus(subject RedisAccessKeys_St } // Deserialize back into memory - var actual RedisAccessKeys_Status + var actual RedisInstanceDetails_Status err = json.Unmarshal(bin, &actual) if err != nil { return err.Error() @@ -624,55 +624,59 @@ func RunJSONSerializationTestForRedisAccessKeysStatus(subject RedisAccessKeys_St return "" } -// Generator of RedisAccessKeys_Status instances for property testing - lazily instantiated by -//RedisAccessKeysStatusGenerator() -var redisAccessKeysStatusGenerator gopter.Gen +// Generator of RedisInstanceDetails_Status instances for property testing - lazily instantiated by +//RedisInstanceDetailsStatusGenerator() +var redisInstanceDetailsStatusGenerator gopter.Gen -// RedisAccessKeysStatusGenerator returns a generator of RedisAccessKeys_Status instances for property testing. -func RedisAccessKeysStatusGenerator() gopter.Gen { - if redisAccessKeysStatusGenerator != nil { - return redisAccessKeysStatusGenerator +// RedisInstanceDetailsStatusGenerator returns a generator of RedisInstanceDetails_Status instances for property testing. +func RedisInstanceDetailsStatusGenerator() gopter.Gen { + if redisInstanceDetailsStatusGenerator != nil { + return redisInstanceDetailsStatusGenerator } generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForRedisAccessKeysStatus(generators) - redisAccessKeysStatusGenerator = gen.Struct(reflect.TypeOf(RedisAccessKeys_Status{}), generators) + AddIndependentPropertyGeneratorsForRedisInstanceDetailsStatus(generators) + redisInstanceDetailsStatusGenerator = gen.Struct(reflect.TypeOf(RedisInstanceDetails_Status{}), generators) - return redisAccessKeysStatusGenerator + return redisInstanceDetailsStatusGenerator } -// AddIndependentPropertyGeneratorsForRedisAccessKeysStatus is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForRedisAccessKeysStatus(gens map[string]gopter.Gen) { - gens["PrimaryKey"] = gen.PtrOf(gen.AlphaString()) - gens["SecondaryKey"] = gen.PtrOf(gen.AlphaString()) +// AddIndependentPropertyGeneratorsForRedisInstanceDetailsStatus is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRedisInstanceDetailsStatus(gens map[string]gopter.Gen) { + gens["IsMaster"] = gen.PtrOf(gen.Bool()) + gens["IsPrimary"] = gen.PtrOf(gen.Bool()) + gens["NonSslPort"] = gen.PtrOf(gen.Int()) + gens["ShardId"] = gen.PtrOf(gen.Int()) + gens["SslPort"] = gen.PtrOf(gen.Int()) + gens["Zone"] = gen.PtrOf(gen.AlphaString()) } -func Test_RedisInstanceDetails_Status_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { +func Test_RedisLinkedServer_Status_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() parameters.MaxSize = 10 properties := gopter.NewProperties(parameters) properties.Property( - "Round trip from RedisInstanceDetails_Status to RedisInstanceDetails_Status via AssignPropertiesToRedisInstanceDetailsStatus & AssignPropertiesFromRedisInstanceDetailsStatus returns original", - prop.ForAll(RunPropertyAssignmentTestForRedisInstanceDetailsStatus, RedisInstanceDetailsStatusGenerator())) + "Round trip from RedisLinkedServer_Status to RedisLinkedServer_Status via AssignPropertiesToRedisLinkedServerStatus & AssignPropertiesFromRedisLinkedServerStatus returns original", + prop.ForAll(RunPropertyAssignmentTestForRedisLinkedServerStatus, RedisLinkedServerStatusGenerator())) properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) } -// RunPropertyAssignmentTestForRedisInstanceDetailsStatus tests if a specific instance of RedisInstanceDetails_Status can be assigned to v1alpha1api20201201storage and back losslessly -func RunPropertyAssignmentTestForRedisInstanceDetailsStatus(subject RedisInstanceDetails_Status) string { +// RunPropertyAssignmentTestForRedisLinkedServerStatus tests if a specific instance of RedisLinkedServer_Status can be assigned to v1alpha1api20201201storage and back losslessly +func RunPropertyAssignmentTestForRedisLinkedServerStatus(subject RedisLinkedServer_Status) string { // Copy subject to make sure assignment doesn't modify it copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v1alpha1api20201201storage.RedisInstanceDetails_Status - err := copied.AssignPropertiesToRedisInstanceDetailsStatus(&other) + var other v1alpha1api20201201storage.RedisLinkedServer_Status + err := copied.AssignPropertiesToRedisLinkedServerStatus(&other) if err != nil { return err.Error() } // Use AssignPropertiesFrom() to convert back to our original type - var actual RedisInstanceDetails_Status - err = actual.AssignPropertiesFromRedisInstanceDetailsStatus(&other) + var actual RedisLinkedServer_Status + err = actual.AssignPropertiesFromRedisLinkedServerStatus(&other) if err != nil { return err.Error() } @@ -689,19 +693,19 @@ func RunPropertyAssignmentTestForRedisInstanceDetailsStatus(subject RedisInstanc return "" } -func Test_RedisInstanceDetails_Status_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { +func Test_RedisLinkedServer_Status_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() parameters.MaxSize = 10 properties := gopter.NewProperties(parameters) properties.Property( - "Round trip of RedisInstanceDetails_Status via JSON returns original", - prop.ForAll(RunJSONSerializationTestForRedisInstanceDetailsStatus, RedisInstanceDetailsStatusGenerator())) + "Round trip of RedisLinkedServer_Status via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRedisLinkedServerStatus, RedisLinkedServerStatusGenerator())) properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) } -// RunJSONSerializationTestForRedisInstanceDetailsStatus runs a test to see if a specific instance of RedisInstanceDetails_Status round trips to JSON and back losslessly -func RunJSONSerializationTestForRedisInstanceDetailsStatus(subject RedisInstanceDetails_Status) string { +// RunJSONSerializationTestForRedisLinkedServerStatus runs a test to see if a specific instance of RedisLinkedServer_Status round trips to JSON and back losslessly +func RunJSONSerializationTestForRedisLinkedServerStatus(subject RedisLinkedServer_Status) string { // Serialize to JSON bin, err := json.Marshal(subject) if err != nil { @@ -709,7 +713,7 @@ func RunJSONSerializationTestForRedisInstanceDetailsStatus(subject RedisInstance } // Deserialize back into memory - var actual RedisInstanceDetails_Status + var actual RedisLinkedServer_Status err = json.Unmarshal(bin, &actual) if err != nil { return err.Error() @@ -727,59 +731,54 @@ func RunJSONSerializationTestForRedisInstanceDetailsStatus(subject RedisInstance return "" } -// Generator of RedisInstanceDetails_Status instances for property testing - lazily instantiated by -//RedisInstanceDetailsStatusGenerator() -var redisInstanceDetailsStatusGenerator gopter.Gen +// Generator of RedisLinkedServer_Status instances for property testing - lazily instantiated by +//RedisLinkedServerStatusGenerator() +var redisLinkedServerStatusGenerator gopter.Gen -// RedisInstanceDetailsStatusGenerator returns a generator of RedisInstanceDetails_Status instances for property testing. -func RedisInstanceDetailsStatusGenerator() gopter.Gen { - if redisInstanceDetailsStatusGenerator != nil { - return redisInstanceDetailsStatusGenerator +// RedisLinkedServerStatusGenerator returns a generator of RedisLinkedServer_Status instances for property testing. +func RedisLinkedServerStatusGenerator() gopter.Gen { + if redisLinkedServerStatusGenerator != nil { + return redisLinkedServerStatusGenerator } generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForRedisInstanceDetailsStatus(generators) - redisInstanceDetailsStatusGenerator = gen.Struct(reflect.TypeOf(RedisInstanceDetails_Status{}), generators) + AddIndependentPropertyGeneratorsForRedisLinkedServerStatus(generators) + redisLinkedServerStatusGenerator = gen.Struct(reflect.TypeOf(RedisLinkedServer_Status{}), generators) - return redisInstanceDetailsStatusGenerator + return redisLinkedServerStatusGenerator } -// AddIndependentPropertyGeneratorsForRedisInstanceDetailsStatus is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForRedisInstanceDetailsStatus(gens map[string]gopter.Gen) { - gens["IsMaster"] = gen.PtrOf(gen.Bool()) - gens["IsPrimary"] = gen.PtrOf(gen.Bool()) - gens["NonSslPort"] = gen.PtrOf(gen.Int()) - gens["ShardId"] = gen.PtrOf(gen.Int()) - gens["SslPort"] = gen.PtrOf(gen.Int()) - gens["Zone"] = gen.PtrOf(gen.AlphaString()) +// AddIndependentPropertyGeneratorsForRedisLinkedServerStatus is a factory method for creating gopter generators +func AddIndependentPropertyGeneratorsForRedisLinkedServerStatus(gens map[string]gopter.Gen) { + gens["Id"] = gen.PtrOf(gen.AlphaString()) } -func Test_RedisLinkedServer_Status_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { +func Test_RedisOperatorSpec_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() parameters.MaxSize = 10 properties := gopter.NewProperties(parameters) properties.Property( - "Round trip from RedisLinkedServer_Status to RedisLinkedServer_Status via AssignPropertiesToRedisLinkedServerStatus & AssignPropertiesFromRedisLinkedServerStatus returns original", - prop.ForAll(RunPropertyAssignmentTestForRedisLinkedServerStatus, RedisLinkedServerStatusGenerator())) + "Round trip from RedisOperatorSpec to RedisOperatorSpec via AssignPropertiesToRedisOperatorSpec & AssignPropertiesFromRedisOperatorSpec returns original", + prop.ForAll(RunPropertyAssignmentTestForRedisOperatorSpec, RedisOperatorSpecGenerator())) properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) } -// RunPropertyAssignmentTestForRedisLinkedServerStatus tests if a specific instance of RedisLinkedServer_Status can be assigned to v1alpha1api20201201storage and back losslessly -func RunPropertyAssignmentTestForRedisLinkedServerStatus(subject RedisLinkedServer_Status) string { +// RunPropertyAssignmentTestForRedisOperatorSpec tests if a specific instance of RedisOperatorSpec can be assigned to v1alpha1api20201201storage and back losslessly +func RunPropertyAssignmentTestForRedisOperatorSpec(subject RedisOperatorSpec) string { // Copy subject to make sure assignment doesn't modify it copied := subject.DeepCopy() // Use AssignPropertiesTo() for the first stage of conversion - var other v1alpha1api20201201storage.RedisLinkedServer_Status - err := copied.AssignPropertiesToRedisLinkedServerStatus(&other) + var other v1alpha1api20201201storage.RedisOperatorSpec + err := copied.AssignPropertiesToRedisOperatorSpec(&other) if err != nil { return err.Error() } // Use AssignPropertiesFrom() to convert back to our original type - var actual RedisLinkedServer_Status - err = actual.AssignPropertiesFromRedisLinkedServerStatus(&other) + var actual RedisOperatorSpec + err = actual.AssignPropertiesFromRedisOperatorSpec(&other) if err != nil { return err.Error() } @@ -796,19 +795,19 @@ func RunPropertyAssignmentTestForRedisLinkedServerStatus(subject RedisLinkedServ return "" } -func Test_RedisLinkedServer_Status_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { +func Test_RedisOperatorSpec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() parameters.MaxSize = 10 properties := gopter.NewProperties(parameters) properties.Property( - "Round trip of RedisLinkedServer_Status via JSON returns original", - prop.ForAll(RunJSONSerializationTestForRedisLinkedServerStatus, RedisLinkedServerStatusGenerator())) + "Round trip of RedisOperatorSpec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRedisOperatorSpec, RedisOperatorSpecGenerator())) properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) } -// RunJSONSerializationTestForRedisLinkedServerStatus runs a test to see if a specific instance of RedisLinkedServer_Status round trips to JSON and back losslessly -func RunJSONSerializationTestForRedisLinkedServerStatus(subject RedisLinkedServer_Status) string { +// RunJSONSerializationTestForRedisOperatorSpec runs a test to see if a specific instance of RedisOperatorSpec round trips to JSON and back losslessly +func RunJSONSerializationTestForRedisOperatorSpec(subject RedisOperatorSpec) string { // Serialize to JSON bin, err := json.Marshal(subject) if err != nil { @@ -816,7 +815,7 @@ func RunJSONSerializationTestForRedisLinkedServerStatus(subject RedisLinkedServe } // Deserialize back into memory - var actual RedisLinkedServer_Status + var actual RedisOperatorSpec err = json.Unmarshal(bin, &actual) if err != nil { return err.Error() @@ -834,26 +833,25 @@ func RunJSONSerializationTestForRedisLinkedServerStatus(subject RedisLinkedServe return "" } -// Generator of RedisLinkedServer_Status instances for property testing - lazily instantiated by -//RedisLinkedServerStatusGenerator() -var redisLinkedServerStatusGenerator gopter.Gen +// Generator of RedisOperatorSpec instances for property testing - lazily instantiated by RedisOperatorSpecGenerator() +var redisOperatorSpecGenerator gopter.Gen -// RedisLinkedServerStatusGenerator returns a generator of RedisLinkedServer_Status instances for property testing. -func RedisLinkedServerStatusGenerator() gopter.Gen { - if redisLinkedServerStatusGenerator != nil { - return redisLinkedServerStatusGenerator +// RedisOperatorSpecGenerator returns a generator of RedisOperatorSpec instances for property testing. +func RedisOperatorSpecGenerator() gopter.Gen { + if redisOperatorSpecGenerator != nil { + return redisOperatorSpecGenerator } generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForRedisLinkedServerStatus(generators) - redisLinkedServerStatusGenerator = gen.Struct(reflect.TypeOf(RedisLinkedServer_Status{}), generators) + AddRelatedPropertyGeneratorsForRedisOperatorSpec(generators) + redisOperatorSpecGenerator = gen.Struct(reflect.TypeOf(RedisOperatorSpec{}), generators) - return redisLinkedServerStatusGenerator + return redisOperatorSpecGenerator } -// AddIndependentPropertyGeneratorsForRedisLinkedServerStatus is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForRedisLinkedServerStatus(gens map[string]gopter.Gen) { - gens["Id"] = gen.PtrOf(gen.AlphaString()) +// AddRelatedPropertyGeneratorsForRedisOperatorSpec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForRedisOperatorSpec(gens map[string]gopter.Gen) { + gens["Secrets"] = gen.PtrOf(RedisOperatorSecretsGenerator()) } func Test_Sku_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { @@ -1061,3 +1059,99 @@ func AddIndependentPropertyGeneratorsForSkuStatus(gens map[string]gopter.Gen) { gens["Family"] = gen.OneConstOf(SkuStatusFamilyC, SkuStatusFamilyP) gens["Name"] = gen.OneConstOf(SkuStatusNameBasic, SkuStatusNamePremium, SkuStatusNameStandard) } + +func Test_RedisOperatorSecrets_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip from RedisOperatorSecrets to RedisOperatorSecrets via AssignPropertiesToRedisOperatorSecrets & AssignPropertiesFromRedisOperatorSecrets returns original", + prop.ForAll(RunPropertyAssignmentTestForRedisOperatorSecrets, RedisOperatorSecretsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(false, 240, os.Stdout)) +} + +// RunPropertyAssignmentTestForRedisOperatorSecrets tests if a specific instance of RedisOperatorSecrets can be assigned to v1alpha1api20201201storage and back losslessly +func RunPropertyAssignmentTestForRedisOperatorSecrets(subject RedisOperatorSecrets) string { + // Copy subject to make sure assignment doesn't modify it + copied := subject.DeepCopy() + + // Use AssignPropertiesTo() for the first stage of conversion + var other v1alpha1api20201201storage.RedisOperatorSecrets + err := copied.AssignPropertiesToRedisOperatorSecrets(&other) + if err != nil { + return err.Error() + } + + // Use AssignPropertiesFrom() to convert back to our original type + var actual RedisOperatorSecrets + err = actual.AssignPropertiesFromRedisOperatorSecrets(&other) + if err != nil { + return err.Error() + } + + //Check for a match + match := cmp.Equal(subject, actual) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +func Test_RedisOperatorSecrets_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RedisOperatorSecrets via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRedisOperatorSecrets, RedisOperatorSecretsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRedisOperatorSecrets runs a test to see if a specific instance of RedisOperatorSecrets round trips to JSON and back losslessly +func RunJSONSerializationTestForRedisOperatorSecrets(subject RedisOperatorSecrets) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RedisOperatorSecrets + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RedisOperatorSecrets instances for property testing - lazily instantiated by +//RedisOperatorSecretsGenerator() +var redisOperatorSecretsGenerator gopter.Gen + +// RedisOperatorSecretsGenerator returns a generator of RedisOperatorSecrets instances for property testing. +func RedisOperatorSecretsGenerator() gopter.Gen { + if redisOperatorSecretsGenerator != nil { + return redisOperatorSecretsGenerator + } + + generators := make(map[string]gopter.Gen) + redisOperatorSecretsGenerator = gen.Struct(reflect.TypeOf(RedisOperatorSecrets{}), generators) + + return redisOperatorSecretsGenerator +} diff --git a/v2/api/cache/v1alpha1api20201201/zz_generated.deepcopy.go b/v2/api/cache/v1alpha1api20201201/zz_generated.deepcopy.go index 68eb03bf8ca..a3b96811231 100644 --- a/v2/api/cache/v1alpha1api20201201/zz_generated.deepcopy.go +++ b/v2/api/cache/v1alpha1api20201201/zz_generated.deepcopy.go @@ -83,56 +83,6 @@ func (in *Redis) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RedisAccessKeys_Status) DeepCopyInto(out *RedisAccessKeys_Status) { - *out = *in - if in.PrimaryKey != nil { - in, out := &in.PrimaryKey, &out.PrimaryKey - *out = new(string) - **out = **in - } - if in.SecondaryKey != nil { - in, out := &in.SecondaryKey, &out.SecondaryKey - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisAccessKeys_Status. -func (in *RedisAccessKeys_Status) DeepCopy() *RedisAccessKeys_Status { - if in == nil { - return nil - } - out := new(RedisAccessKeys_Status) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RedisAccessKeys_StatusARM) DeepCopyInto(out *RedisAccessKeys_StatusARM) { - *out = *in - if in.PrimaryKey != nil { - in, out := &in.PrimaryKey, &out.PrimaryKey - *out = new(string) - **out = **in - } - if in.SecondaryKey != nil { - in, out := &in.SecondaryKey, &out.SecondaryKey - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisAccessKeys_StatusARM. -func (in *RedisAccessKeys_StatusARM) DeepCopy() *RedisAccessKeys_StatusARM { - if in == nil { - return nil - } - out := new(RedisAccessKeys_StatusARM) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RedisCreatePropertiesARM) DeepCopyInto(out *RedisCreatePropertiesARM) { *out = *in @@ -840,6 +790,66 @@ func (in *RedisList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedisOperatorSecrets) DeepCopyInto(out *RedisOperatorSecrets) { + *out = *in + if in.HostName != nil { + in, out := &in.HostName, &out.HostName + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.PrimaryKey != nil { + in, out := &in.PrimaryKey, &out.PrimaryKey + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.SSLPort != nil { + in, out := &in.SSLPort, &out.SSLPort + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.SecondaryKey != nil { + in, out := &in.SecondaryKey, &out.SecondaryKey + *out = new(genruntime.SecretDestination) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisOperatorSecrets. +func (in *RedisOperatorSecrets) DeepCopy() *RedisOperatorSecrets { + if in == nil { + return nil + } + out := new(RedisOperatorSecrets) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedisOperatorSpec) DeepCopyInto(out *RedisOperatorSpec) { + *out = *in + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = new(RedisOperatorSecrets) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisOperatorSpec. +func (in *RedisOperatorSpec) DeepCopy() *RedisOperatorSpec { + if in == nil { + return nil + } + out := new(RedisOperatorSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RedisPatchSchedule) DeepCopyInto(out *RedisPatchSchedule) { *out = *in @@ -1044,11 +1054,6 @@ func (in *RedisPatchSchedules_SpecARM) DeepCopy() *RedisPatchSchedules_SpecARM { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RedisProperties_StatusARM) DeepCopyInto(out *RedisProperties_StatusARM) { *out = *in - if in.AccessKeys != nil { - in, out := &in.AccessKeys, &out.AccessKeys - *out = new(RedisAccessKeys_StatusARM) - (*in).DeepCopyInto(*out) - } if in.EnableNonSslPort != nil { in, out := &in.EnableNonSslPort, &out.EnableNonSslPort *out = new(bool) @@ -1165,11 +1170,6 @@ func (in *RedisProperties_StatusARM) DeepCopy() *RedisProperties_StatusARM { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RedisResource_Status) DeepCopyInto(out *RedisResource_Status) { *out = *in - if in.AccessKeys != nil { - in, out := &in.AccessKeys, &out.AccessKeys - *out = new(RedisAccessKeys_Status) - (*in).DeepCopyInto(*out) - } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]conditions.Condition, len(*in)) @@ -1391,6 +1391,11 @@ func (in *Redis_Spec) DeepCopyInto(out *Redis_Spec) { *out = new(RedisCreatePropertiesMinimumTlsVersion) **out = **in } + if in.OperatorSpec != nil { + in, out := &in.OperatorSpec, &out.OperatorSpec + *out = new(RedisOperatorSpec) + (*in).DeepCopyInto(*out) + } out.Owner = in.Owner if in.PublicNetworkAccess != nil { in, out := &in.PublicNetworkAccess, &out.PublicNetworkAccess diff --git a/v2/api/cache/v1alpha1api20201201storage/redis_types_gen.go b/v2/api/cache/v1alpha1api20201201storage/redis_types_gen.go index e0ac2f16f50..2147068761b 100644 --- a/v2/api/cache/v1alpha1api20201201storage/redis_types_gen.go +++ b/v2/api/cache/v1alpha1api20201201storage/redis_types_gen.go @@ -132,7 +132,6 @@ type RedisList struct { //Storage version of v1alpha1api20201201.RedisResource_Status type RedisResource_Status struct { - AccessKeys *RedisAccessKeys_Status `json:"accessKeys,omitempty"` Conditions []conditions.Condition `json:"conditions,omitempty"` EnableNonSslPort *bool `json:"enableNonSslPort,omitempty"` HostName *string `json:"hostName,omitempty"` @@ -186,11 +185,12 @@ func (resource *RedisResource_Status) ConvertStatusTo(destination genruntime.Con type Redis_Spec struct { //AzureName: The name of the resource in Azure. This is often the same as the name of the resource in Kubernetes but it //doesn't have to be. - AzureName string `json:"azureName"` - EnableNonSslPort *bool `json:"enableNonSslPort,omitempty"` - Location *string `json:"location,omitempty"` - MinimumTlsVersion *string `json:"minimumTlsVersion,omitempty"` - OriginalVersion string `json:"originalVersion"` + AzureName string `json:"azureName"` + EnableNonSslPort *bool `json:"enableNonSslPort,omitempty"` + Location *string `json:"location,omitempty"` + MinimumTlsVersion *string `json:"minimumTlsVersion,omitempty"` + OperatorSpec *RedisOperatorSpec `json:"operatorSpec,omitempty"` + OriginalVersion string `json:"originalVersion"` // +kubebuilder:validation:Required Owner genruntime.KnownResourceReference `group:"resources.azure.com" json:"owner" kind:"ResourceGroup"` @@ -276,13 +276,6 @@ func (embedded *PrivateEndpointConnection_Status_SubResourceEmbedded) AssignProp return nil } -//Storage version of v1alpha1api20201201.RedisAccessKeys_Status -type RedisAccessKeys_Status struct { - PrimaryKey *string `json:"primaryKey,omitempty"` - PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` - SecondaryKey *string `json:"secondaryKey,omitempty"` -} - //Storage version of v1alpha1api20201201.RedisInstanceDetails_Status type RedisInstanceDetails_Status struct { IsMaster *bool `json:"isMaster,omitempty"` @@ -300,6 +293,13 @@ type RedisLinkedServer_Status struct { PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` } +//Storage version of v1alpha1api20201201.RedisOperatorSpec +//Details for configuring operator behavior. Fields in this struct are interpreted by the operator directly rather than being passed to Azure +type RedisOperatorSpec struct { + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + Secrets *RedisOperatorSecrets `json:"secrets,omitempty"` +} + //Storage version of v1alpha1api20201201.Sku //Generated from: https://schema.management.azure.com/schemas/2020-12-01/Microsoft.Cache.json#/definitions/Sku type Sku struct { @@ -441,6 +441,16 @@ func (sku *Sku_Status) AssignPropertiesToSkuStatus(destination *v1alpha1api20210 return nil } +//Storage version of v1alpha1api20201201.RedisOperatorSecrets +type RedisOperatorSecrets struct { + HostName *genruntime.SecretDestination `json:"hostName,omitempty"` + Port *genruntime.SecretDestination `json:"port,omitempty"` + PrimaryKey *genruntime.SecretDestination `json:"primaryKey,omitempty"` + PropertyBag genruntime.PropertyBag `json:"$propertyBag,omitempty"` + SSLPort *genruntime.SecretDestination `json:"sslPort,omitempty"` + SecondaryKey *genruntime.SecretDestination `json:"secondaryKey,omitempty"` +} + func init() { SchemeBuilder.Register(&Redis{}, &RedisList{}) } diff --git a/v2/api/cache/v1alpha1api20201201storage/redis_types_gen_test.go b/v2/api/cache/v1alpha1api20201201storage/redis_types_gen_test.go index 7132b90c2f8..c959680005f 100644 --- a/v2/api/cache/v1alpha1api20201201storage/redis_types_gen_test.go +++ b/v2/api/cache/v1alpha1api20201201storage/redis_types_gen_test.go @@ -169,7 +169,6 @@ func AddIndependentPropertyGeneratorsForRedisResourceStatus(gens map[string]gopt // AddRelatedPropertyGeneratorsForRedisResourceStatus is a factory method for creating gopter generators func AddRelatedPropertyGeneratorsForRedisResourceStatus(gens map[string]gopter.Gen) { - gens["AccessKeys"] = gen.PtrOf(RedisAccessKeysStatusGenerator()) gens["Instances"] = gen.SliceOf(RedisInstanceDetailsStatusGenerator()) gens["LinkedServers"] = gen.SliceOf(RedisLinkedServerStatusGenerator()) gens["PrivateEndpointConnections"] = gen.SliceOf(PrivateEndpointConnectionStatusSubResourceEmbeddedGenerator()) @@ -260,6 +259,7 @@ func AddIndependentPropertyGeneratorsForRedisSpec(gens map[string]gopter.Gen) { // AddRelatedPropertyGeneratorsForRedisSpec is a factory method for creating gopter generators func AddRelatedPropertyGeneratorsForRedisSpec(gens map[string]gopter.Gen) { + gens["OperatorSpec"] = gen.PtrOf(RedisOperatorSpecGenerator()) gens["Sku"] = gen.PtrOf(SkuGenerator()) } @@ -365,67 +365,6 @@ func AddIndependentPropertyGeneratorsForPrivateEndpointConnectionStatusSubResour gens["Id"] = gen.PtrOf(gen.AlphaString()) } -func Test_RedisAccessKeys_Status_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { - t.Parallel() - parameters := gopter.DefaultTestParameters() - parameters.MaxSize = 10 - properties := gopter.NewProperties(parameters) - properties.Property( - "Round trip of RedisAccessKeys_Status via JSON returns original", - prop.ForAll(RunJSONSerializationTestForRedisAccessKeysStatus, RedisAccessKeysStatusGenerator())) - properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) -} - -// RunJSONSerializationTestForRedisAccessKeysStatus runs a test to see if a specific instance of RedisAccessKeys_Status round trips to JSON and back losslessly -func RunJSONSerializationTestForRedisAccessKeysStatus(subject RedisAccessKeys_Status) string { - // Serialize to JSON - bin, err := json.Marshal(subject) - if err != nil { - return err.Error() - } - - // Deserialize back into memory - var actual RedisAccessKeys_Status - err = json.Unmarshal(bin, &actual) - if err != nil { - return err.Error() - } - - // Check for outcome - match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) - if !match { - actualFmt := pretty.Sprint(actual) - subjectFmt := pretty.Sprint(subject) - result := diff.Diff(subjectFmt, actualFmt) - return result - } - - return "" -} - -// Generator of RedisAccessKeys_Status instances for property testing - lazily instantiated by -//RedisAccessKeysStatusGenerator() -var redisAccessKeysStatusGenerator gopter.Gen - -// RedisAccessKeysStatusGenerator returns a generator of RedisAccessKeys_Status instances for property testing. -func RedisAccessKeysStatusGenerator() gopter.Gen { - if redisAccessKeysStatusGenerator != nil { - return redisAccessKeysStatusGenerator - } - - generators := make(map[string]gopter.Gen) - AddIndependentPropertyGeneratorsForRedisAccessKeysStatus(generators) - redisAccessKeysStatusGenerator = gen.Struct(reflect.TypeOf(RedisAccessKeys_Status{}), generators) - - return redisAccessKeysStatusGenerator -} - -// AddIndependentPropertyGeneratorsForRedisAccessKeysStatus is a factory method for creating gopter generators -func AddIndependentPropertyGeneratorsForRedisAccessKeysStatus(gens map[string]gopter.Gen) { - gens["PrimaryKey"] = gen.PtrOf(gen.AlphaString()) - gens["SecondaryKey"] = gen.PtrOf(gen.AlphaString()) -} - func Test_RedisInstanceDetails_Status_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -551,6 +490,65 @@ func AddIndependentPropertyGeneratorsForRedisLinkedServerStatus(gens map[string] gens["Id"] = gen.PtrOf(gen.AlphaString()) } +func Test_RedisOperatorSpec_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RedisOperatorSpec via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRedisOperatorSpec, RedisOperatorSpecGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRedisOperatorSpec runs a test to see if a specific instance of RedisOperatorSpec round trips to JSON and back losslessly +func RunJSONSerializationTestForRedisOperatorSpec(subject RedisOperatorSpec) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RedisOperatorSpec + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RedisOperatorSpec instances for property testing - lazily instantiated by RedisOperatorSpecGenerator() +var redisOperatorSpecGenerator gopter.Gen + +// RedisOperatorSpecGenerator returns a generator of RedisOperatorSpec instances for property testing. +func RedisOperatorSpecGenerator() gopter.Gen { + if redisOperatorSpecGenerator != nil { + return redisOperatorSpecGenerator + } + + generators := make(map[string]gopter.Gen) + AddRelatedPropertyGeneratorsForRedisOperatorSpec(generators) + redisOperatorSpecGenerator = gen.Struct(reflect.TypeOf(RedisOperatorSpec{}), generators) + + return redisOperatorSpecGenerator +} + +// AddRelatedPropertyGeneratorsForRedisOperatorSpec is a factory method for creating gopter generators +func AddRelatedPropertyGeneratorsForRedisOperatorSpec(gens map[string]gopter.Gen) { + gens["Secrets"] = gen.PtrOf(RedisOperatorSecretsGenerator()) +} + func Test_Sku_WhenPropertiesConverted_RoundTripsWithoutLoss(t *testing.T) { t.Parallel() parameters := gopter.DefaultTestParameters() @@ -756,3 +754,57 @@ func AddIndependentPropertyGeneratorsForSkuStatus(gens map[string]gopter.Gen) { gens["Family"] = gen.PtrOf(gen.AlphaString()) gens["Name"] = gen.PtrOf(gen.AlphaString()) } + +func Test_RedisOperatorSecrets_WhenSerializedToJson_DeserializesAsEqual(t *testing.T) { + t.Parallel() + parameters := gopter.DefaultTestParameters() + parameters.MaxSize = 10 + properties := gopter.NewProperties(parameters) + properties.Property( + "Round trip of RedisOperatorSecrets via JSON returns original", + prop.ForAll(RunJSONSerializationTestForRedisOperatorSecrets, RedisOperatorSecretsGenerator())) + properties.TestingRun(t, gopter.NewFormatedReporter(true, 240, os.Stdout)) +} + +// RunJSONSerializationTestForRedisOperatorSecrets runs a test to see if a specific instance of RedisOperatorSecrets round trips to JSON and back losslessly +func RunJSONSerializationTestForRedisOperatorSecrets(subject RedisOperatorSecrets) string { + // Serialize to JSON + bin, err := json.Marshal(subject) + if err != nil { + return err.Error() + } + + // Deserialize back into memory + var actual RedisOperatorSecrets + err = json.Unmarshal(bin, &actual) + if err != nil { + return err.Error() + } + + // Check for outcome + match := cmp.Equal(subject, actual, cmpopts.EquateEmpty()) + if !match { + actualFmt := pretty.Sprint(actual) + subjectFmt := pretty.Sprint(subject) + result := diff.Diff(subjectFmt, actualFmt) + return result + } + + return "" +} + +// Generator of RedisOperatorSecrets instances for property testing - lazily instantiated by +//RedisOperatorSecretsGenerator() +var redisOperatorSecretsGenerator gopter.Gen + +// RedisOperatorSecretsGenerator returns a generator of RedisOperatorSecrets instances for property testing. +func RedisOperatorSecretsGenerator() gopter.Gen { + if redisOperatorSecretsGenerator != nil { + return redisOperatorSecretsGenerator + } + + generators := make(map[string]gopter.Gen) + redisOperatorSecretsGenerator = gen.Struct(reflect.TypeOf(RedisOperatorSecrets{}), generators) + + return redisOperatorSecretsGenerator +} diff --git a/v2/api/cache/v1alpha1api20201201storage/zz_generated.deepcopy.go b/v2/api/cache/v1alpha1api20201201storage/zz_generated.deepcopy.go index cab65c833c1..0dec0027aa8 100644 --- a/v2/api/cache/v1alpha1api20201201storage/zz_generated.deepcopy.go +++ b/v2/api/cache/v1alpha1api20201201storage/zz_generated.deepcopy.go @@ -70,38 +70,6 @@ func (in *Redis) DeepCopyObject() runtime.Object { return nil } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RedisAccessKeys_Status) DeepCopyInto(out *RedisAccessKeys_Status) { - *out = *in - if in.PrimaryKey != nil { - in, out := &in.PrimaryKey, &out.PrimaryKey - *out = new(string) - **out = **in - } - if in.PropertyBag != nil { - in, out := &in.PropertyBag, &out.PropertyBag - *out = make(genruntime.PropertyBag, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.SecondaryKey != nil { - in, out := &in.SecondaryKey, &out.SecondaryKey - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisAccessKeys_Status. -func (in *RedisAccessKeys_Status) DeepCopy() *RedisAccessKeys_Status { - if in == nil { - return nil - } - out := new(RedisAccessKeys_Status) - in.DeepCopyInto(out) - return out -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RedisFirewallRule) DeepCopyInto(out *RedisFirewallRule) { *out = *in @@ -540,6 +508,80 @@ func (in *RedisList) DeepCopyObject() runtime.Object { return nil } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedisOperatorSecrets) DeepCopyInto(out *RedisOperatorSecrets) { + *out = *in + if in.HostName != nil { + in, out := &in.HostName, &out.HostName + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.Port != nil { + in, out := &in.Port, &out.Port + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.PrimaryKey != nil { + in, out := &in.PrimaryKey, &out.PrimaryKey + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SSLPort != nil { + in, out := &in.SSLPort, &out.SSLPort + *out = new(genruntime.SecretDestination) + **out = **in + } + if in.SecondaryKey != nil { + in, out := &in.SecondaryKey, &out.SecondaryKey + *out = new(genruntime.SecretDestination) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisOperatorSecrets. +func (in *RedisOperatorSecrets) DeepCopy() *RedisOperatorSecrets { + if in == nil { + return nil + } + out := new(RedisOperatorSecrets) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedisOperatorSpec) DeepCopyInto(out *RedisOperatorSpec) { + *out = *in + if in.PropertyBag != nil { + in, out := &in.PropertyBag, &out.PropertyBag + *out = make(genruntime.PropertyBag, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Secrets != nil { + in, out := &in.Secrets, &out.Secrets + *out = new(RedisOperatorSecrets) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisOperatorSpec. +func (in *RedisOperatorSpec) DeepCopy() *RedisOperatorSpec { + if in == nil { + return nil + } + out := new(RedisOperatorSpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RedisPatchSchedule) DeepCopyInto(out *RedisPatchSchedule) { *out = *in @@ -695,11 +737,6 @@ func (in *RedisPatchSchedules_Spec) DeepCopy() *RedisPatchSchedules_Spec { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RedisResource_Status) DeepCopyInto(out *RedisResource_Status) { *out = *in - if in.AccessKeys != nil { - in, out := &in.AccessKeys, &out.AccessKeys - *out = new(RedisAccessKeys_Status) - (*in).DeepCopyInto(*out) - } if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions *out = make([]conditions.Condition, len(*in)) @@ -881,6 +918,11 @@ func (in *Redis_Spec) DeepCopyInto(out *Redis_Spec) { *out = new(string) **out = **in } + if in.OperatorSpec != nil { + in, out := &in.OperatorSpec, &out.OperatorSpec + *out = new(RedisOperatorSpec) + (*in).DeepCopyInto(*out) + } out.Owner = in.Owner if in.PropertyBag != nil { in, out := &in.PropertyBag, &out.PropertyBag diff --git a/v2/api/cache/versions_matrix.md b/v2/api/cache/versions_matrix.md index ceef0fb48d3..520e8479a03 100644 --- a/v2/api/cache/versions_matrix.md +++ b/v2/api/cache/versions_matrix.md @@ -25,7 +25,6 @@ | PrivateEndpointConnection_Status_SubResourceEmbedded | v1alpha1api20201201 | v1alpha1api20210301 | | ProvisioningState_Status | | v1alpha1api20210301 | | Redis | v1alpha1api20201201 | | -| RedisAccessKeys_Status | v1alpha1api20201201 | | | RedisCreateProperties | v1alpha1api20201201 | | | RedisCreatePropertiesMinimumTlsVersion | v1alpha1api20201201 | | | RedisCreatePropertiesPublicNetworkAccess | v1alpha1api20201201 | | diff --git a/v2/azure-arm.yaml b/v2/azure-arm.yaml index 1e43b3236af..26c97d8a672 100644 --- a/v2/azure-arm.yaml +++ b/v2/azure-arm.yaml @@ -147,6 +147,11 @@ typeTransformers: value: name: string because: the definition in rest api specs uses additionalProperties + defined fields which we don't support + - group: cache + name: RedisProperties_Status + property: AccessKeys + remove: true + because: AccessKeys is only set on response to PUT/CREATE, but we fill out Status via GET so this field is always empty. It also contains secrets we wouldn't want to expose in status anyway. - group: deploymenttemplate name: ResourceLocations target: @@ -542,6 +547,12 @@ objectModelConfiguration: 2020-12-01: Redis: $export: true + $azureGeneratedSecrets: + - PrimaryKey + - SecondaryKey + - HostName + - Port + - SSLPort RedisCreateProperties: SubnetId: $armReference: true diff --git a/v2/go.mod b/v2/go.mod index c35153f56da..db060fcb814 100644 --- a/v2/go.mod +++ b/v2/go.mod @@ -5,6 +5,7 @@ go 1.17 require ( github.com/Azure/azure-sdk-for-go/sdk/azcore v0.21.0 github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.13.0 + github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis v0.3.0 github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v0.3.0 github.com/Azure/go-autorest/autorest/to v0.4.0 github.com/benbjohnson/clock v1.1.0 diff --git a/v2/go.sum b/v2/go.sum index ce1c66f0edc..6eddf66ec8e 100644 --- a/v2/go.sum +++ b/v2/go.sum @@ -23,8 +23,6 @@ cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiy cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.20.0 h1:KQgdWmEOmaJKxaUUZwHAYh12t+b+ZJf8q3friycK1kA= -github.com/Azure/azure-sdk-for-go/sdk/azcore v0.20.0/go.mod h1:ZPW/Z0kLCTdDZaDbYTetxc9Cxl/2lNqxYHYNOF2bti0= github.com/Azure/azure-sdk-for-go v61.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v61.3.0+incompatible h1:k7MKrYcGwX5qh+fC9xVhcEuaZajFfbDYMEgo8oemTLo= github.com/Azure/azure-sdk-for-go v61.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= @@ -35,6 +33,8 @@ github.com/Azure/azure-sdk-for-go/sdk/azidentity v0.13.0/go.mod h1:TmXReXZ9yPp5D github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.0 h1:HMbyI+KfvL+XyuWekow/nWbRxsAhB6+DVzgQTIABecU= github.com/Azure/azure-sdk-for-go/sdk/internal v0.9.0/go.mod h1:KLF4gFr6DcKFZwSuH8w8yEK6DpFl3LP5rhdvAb7Yz5I= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis v0.3.0 h1:oX1DLGsPo04UGr7HfVqEwNBo0LYFk7MPbDEKarvLELE= +github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/redis/armredis v0.3.0/go.mod h1:XuasrW9k6UtyOa2zinkJCbGtjHs9EpAbUU7Qflzmq8g= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v0.3.0 h1:eAjCVVYhoxCxan05p4WUuvC0aVUpAbKB/P8xedcjBwQ= github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage v0.3.0/go.mod h1:wO83KRKZMp8AlchGkYb282omWyhXtY9lsB1CW7QZcGg= github.com/Azure/go-ansiterm v0.0.0-20210608223527-2377c96fe795/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= @@ -350,7 +350,6 @@ github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFSt github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= -github.com/pkg/browser v0.0.0-20180916011732-0a3d74bf9ce4/go.mod h1:4OwLy04Bl9Ef3GJJCoec+30X3LQs/0/m4HFRt/2LUSA= github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4/go.mod h1:N6UoU20jOqggOuDwUaBQpluzLNDqif3kq9z2wpdYEfQ= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= diff --git a/v2/internal/controllers/crd_cache_redis_test.go b/v2/internal/controllers/crd_cache_redis_test.go index 4fbc6274e1d..9452da4f642 100644 --- a/v2/internal/controllers/crd_cache_redis_test.go +++ b/v2/internal/controllers/crd_cache_redis_test.go @@ -10,10 +10,13 @@ import ( "github.com/Azure/go-autorest/autorest/to" . "github.com/onsi/gomega" + v1 "k8s.io/api/core/v1" + "sigs.k8s.io/controller-runtime/pkg/client" cache "github.com/Azure/azure-service-operator/v2/api/cache/v1alpha1api20201201" resources "github.com/Azure/azure-service-operator/v2/api/resources/v1alpha1api20200601" "github.com/Azure/azure-service-operator/v2/internal/testcommon" + "github.com/Azure/azure-service-operator/v2/pkg/genruntime" ) //nolint:tparallel @@ -172,3 +175,95 @@ func Redis_FirewallRule_CRUD(tc *testcommon.KubePerTestContext, redis *cache.Red tc.Expect(*rule.Status.EndIP).To(Equal("1.2.3.5")) tc.Expect(rule.Status.Id).ToNot(BeNil()) } + +func Test_Cache_Redis_SecretsFromAzure(t *testing.T) { + t.Parallel() + tc := globalTestContext.ForTest(t) + + rg := tc.CreateTestResourceGroupAndWait() + redis := makeRedis(tc, rg, "redis") + + tc.CreateResourceAndWait(redis) + + // There should be no secrets at this point + list := &v1.SecretList{} + tc.ListResources(list, client.InNamespace(tc.Namespace)) + tc.Expect(list.Items).To(HaveLen(0)) + + // Run sub-tests on the redis + tc.RunSubtests( + testcommon.Subtest{ + Name: "SecretsWrittenToSameKubeSecret", + Test: func(tc *testcommon.KubePerTestContext) { + Redis_SecretsWrittenToSameKubeSecret(tc, redis) + }, + }, + testcommon.Subtest{ + Name: "SecretsWrittenToDifferentKubeSecrets", + Test: func(tc *testcommon.KubePerTestContext) { + Redis_SecretsWrittenToDifferentKubeSecrets(tc, redis) + }, + }, + ) +} + +func Redis_SecretsWrittenToSameKubeSecret(tc *testcommon.KubePerTestContext, redis *cache.Redis) { + old := redis.DeepCopy() + redisSecret := "storagekeys" + redis.Spec.OperatorSpec = &cache.RedisOperatorSpec{ + Secrets: &cache.RedisOperatorSecrets{ + PrimaryKey: &genruntime.SecretDestination{ + Name: redisSecret, + Key: "primarykey", + }, + HostName: &genruntime.SecretDestination{ + Name: redisSecret, + Key: "hostname", + }, + SSLPort: &genruntime.SecretDestination{ + Name: redisSecret, + Key: "sslport", + }, + }, + } + tc.PatchResourceAndWait(old, redis) + + tc.ExpectSecretHasKeys(redisSecret, "primarykey", "hostname", "sslport") +} + +func Redis_SecretsWrittenToDifferentKubeSecrets(tc *testcommon.KubePerTestContext, redis *cache.Redis) { + old := redis.DeepCopy() + primaryKeySecret := "secret1" + secondaryKeySecret := "secret2" + hostnameSecret := "secret3" + sslPortSecret := "secret4" + + // Not testing port as it's not returned by default so won't be written anyway + + redis.Spec.OperatorSpec = &cache.RedisOperatorSpec{ + Secrets: &cache.RedisOperatorSecrets{ + PrimaryKey: &genruntime.SecretDestination{ + Name: primaryKeySecret, + Key: "primarykey", + }, + SecondaryKey: &genruntime.SecretDestination{ + Name: secondaryKeySecret, + Key: "secondarykey", + }, + HostName: &genruntime.SecretDestination{ + Name: hostnameSecret, + Key: "hostname", + }, + SSLPort: &genruntime.SecretDestination{ + Name: sslPortSecret, + Key: "sslport", + }, + }, + } + tc.PatchResourceAndWait(old, redis) + + tc.ExpectSecretHasKeys(primaryKeySecret, "primarykey") + tc.ExpectSecretHasKeys(secondaryKeySecret, "secondarykey") + tc.ExpectSecretHasKeys(hostnameSecret, "hostname") + tc.ExpectSecretHasKeys(sslPortSecret, "sslport") +} diff --git a/v2/internal/controllers/recordings/Test_Cache_Redis_SecretsFromAzure.yaml b/v2/internal/controllers/recordings/Test_Cache_Redis_SecretsFromAzure.yaml new file mode 100644 index 00000000000..b91dcbd44e5 --- /dev/null +++ b/v2/internal/controllers/recordings/Test_Cache_Redis_SecretsFromAzure.yaml @@ -0,0 +1,1433 @@ +--- +version: 1 +interactions: +- request: + body: '{"name":"asotest-rg-zdtdxl","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "93" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl?api-version=2020-06-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl","name":"asotest-rg-zdtdxl","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "276" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl?api-version=2020-06-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl","name":"asotest-rg-zdtdxl","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Succeeded"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"location":"westus2","name":"asotest-redis-gwzjyc","properties":{"enableNonSslPort":false,"minimumTlsVersion":"1.2","redisConfiguration":{"maxmemory-delta":"10","maxmemory-policy":"allkeys-lru"},"redisVersion":"6","sku":{"capacity":1,"family":"P","name":"Premium"}}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "267" + Content-Type: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":{"primaryKey":"{KEY}","secondaryKey":"{KEY}"},"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "970" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 201 Created + code: 201 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "4" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "5" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "6" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "7" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "8" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "9" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "10" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "11" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "12" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":false,"isPrimary":false},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "13" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Creating","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":true,"isPrimary":true},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Test-Request-Attempt: + - "14" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Succeeded","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":true,"isPrimary":true},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "15" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Succeeded","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":true,"isPrimary":true},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"location":"westus2","name":"asotest-redis-gwzjyc","properties":{"enableNonSslPort":false,"minimumTlsVersion":"1.2","redisConfiguration":{"maxmemory-delta":"10","maxmemory-policy":"allkeys-lru"},"redisVersion":"6","sku":{"capacity":1,"family":"P","name":"Premium"}}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "267" + Content-Type: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Succeeded","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":true,"isPrimary":true},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":{"primaryKey":"{KEY}","secondaryKey":"{KEY}"},"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "16" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Succeeded","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":true,"isPrimary":true},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc/listKeys?api-version=2021-06-01 + method: POST + response: + body: '{"primaryKey":"{KEY}","secondaryKey":"{KEY}"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: '{"location":"westus2","name":"asotest-redis-gwzjyc","properties":{"enableNonSslPort":false,"minimumTlsVersion":"1.2","redisConfiguration":{"maxmemory-delta":"10","maxmemory-policy":"allkeys-lru"},"redisVersion":"6","sku":{"capacity":1,"family":"P","name":"Premium"}}}' + form: {} + headers: + Accept: + - application/json + Content-Length: + - "267" + Content-Type: + - application/json + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: PUT + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Succeeded","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":true,"isPrimary":true},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":{"primaryKey":"{KEY}","secondaryKey":"{KEY}"},"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "17" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Succeeded","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":true,"isPrimary":true},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc/listKeys?api-version=2021-06-01 + method: POST + response: + body: '{"primaryKey":"{KEY}","secondaryKey":"{KEY}"}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Cache/locations/West%20US%202/operationresults/69e51043-070f-4df7-85a3-32eec3233b78?api-version=2020-12-01 + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "0" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl?api-version=2020-06-01 + method: DELETE + response: + body: "" + headers: + Cache-Control: + - no-cache + Content-Length: + - "0" + Expires: + - "-1" + Location: + - https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1BU09URVNUOjJEUkc6MkRaRFREWEwtV0VTVFVTMiIsImpvYkxvY2F0aW9uIjoid2VzdHVzMiJ9?api-version=2020-06-01 + Pragma: + - no-cache + Retry-After: + - "15" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + status: 202 Accepted + code: 202 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "18" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Deleting","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":true,"isPrimary":true},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "1" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl?api-version=2020-06-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl","name":"asotest-rg-zdtdxl","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Deleting"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "19" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Deleting","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":true,"isPrimary":true},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "2" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl?api-version=2020-06-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl","name":"asotest-rg-zdtdxl","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Deleting"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "3" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl?api-version=2020-06-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl","name":"asotest-rg-zdtdxl","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Deleting"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "20" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Deleting","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":true,"isPrimary":true},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "4" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl?api-version=2020-06-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl","name":"asotest-rg-zdtdxl","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Deleting"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "21" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Deleting","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":true,"isPrimary":true},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "5" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl?api-version=2020-06-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl","name":"asotest-rg-zdtdxl","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Deleting"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "22" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/Redis/asotest-redis-gwzjyc","location":"West + US 2","name":"asotest-redis-gwzjyc","type":"Microsoft.Cache/Redis","tags":{},"properties":{"provisioningState":"Deleting","redisVersion":"6.0.14","sku":{"name":"Premium","family":"P","capacity":1},"enableNonSslPort":false,"instances":[{"sslPort":15000,"isMaster":true,"isPrimary":true},{"sslPort":15001,"isMaster":false,"isPrimary":false}],"minimumTlsVersion":"1.2","publicNetworkAccess":"Enabled","redisConfiguration":{"maxmemory-policy":"allkeys-lru","maxmemory-reserved":"10","maxclients":"7500","maxfragmentationmemory-reserved":"300","maxmemory-delta":"10"},"accessKeys":null,"hostName":"asotest-redis-gwzjyc.redis.cache.windows.net","port":6379,"sslPort":6380,"linkedServers":[]}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "6" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl?api-version=2020-06-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl","name":"asotest-rg-zdtdxl","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Deleting"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "23" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl/providers/Microsoft.Cache/redis/asotest-redis-gwzjyc?api-version=2020-12-01 + method: GET + response: + body: '{"error":{"code":"ResourceNotFound","message":"A requested resource could + not be found. It may already have been deleted.\r\nRequestID=779c6178-0c2d-446f-920c-36ad08643589","target":null}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "188" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Server: + - Microsoft-HTTPAPI/2.0 + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Rp-Server-Mvid: + - 99721f91-6eb7-47b5-a71b-04f4aff49281 + status: 404 Not Found + code: 404 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "7" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl?api-version=2020-06-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl","name":"asotest-rg-zdtdxl","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Deleting"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "8" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl?api-version=2020-06-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl","name":"asotest-rg-zdtdxl","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Deleting"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "9" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl?api-version=2020-06-01 + method: GET + response: + body: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl","name":"asotest-rg-zdtdxl","type":"Microsoft.Resources/resourceGroups","location":"westus2","tags":{"CreatedAt":"2001-02-03T04:05:06Z"},"properties":{"provisioningState":"Deleting"}}' + headers: + Cache-Control: + - no-cache + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + Vary: + - Accept-Encoding + X-Content-Type-Options: + - nosniff + status: 200 OK + code: 200 + duration: "" +- request: + body: "" + form: {} + headers: + Accept: + - application/json + Test-Request-Attempt: + - "10" + url: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/asotest-rg-zdtdxl?api-version=2020-06-01 + method: GET + response: + body: '{"error":{"code":"ResourceGroupNotFound","message":"Resource group ''asotest-rg-zdtdxl'' + could not be found."}}' + headers: + Cache-Control: + - no-cache + Content-Length: + - "109" + Content-Type: + - application/json; charset=utf-8 + Expires: + - "-1" + Pragma: + - no-cache + Strict-Transport-Security: + - max-age=31536000; includeSubDomains + X-Content-Type-Options: + - nosniff + X-Ms-Failure-Cause: + - gateway + status: 404 Not Found + code: 404 + duration: ""