Skip to content

Commit

Permalink
Sync bitbucket and GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
carchi8py committed Aug 9, 2023
1 parent cdda4f6 commit 7f518b5
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 5 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## 23.8.0

ENHANCEMENTS:
NEW ENHANCEMENTS:
* ressource/cvo_aws, cvo_azure, cvo_gcp: remove force new from `retries`.
* resource/cvo_aws and cvo_gcp: add `saas_subscription_id`.

NEW FEATURES:
* resource/cvo_gcp: asupport adding `firewall_tag_name_rule` and `firewall_ip_ranges`.
* resource/cvo_gcp: support adding `firewall_tag_name_rule` and `firewall_ip_ranges`.

## 23.7.0
NEW FEATURES:
Expand Down
3 changes: 2 additions & 1 deletion cloudmanager/cvo_aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type createCVOAWSDetails struct {
CapacityTier string `structs:"capacityTier,omitempty"`
TierLevel string `structs:"tierLevel,omitempty"`
NssAccount string `structs:"nssAccount,omitempty"`
SaasSubscriptionID string `structs:"saasSubscriptionId,omitempty"`
WritingSpeedState string `structs:"writingSpeedState,omitempty"`
ClusterKeyPairName string `structs:"clusterKeyPairName,omitempty"`
IOPS int `structs:"iops,omitempty"`
Expand Down Expand Up @@ -263,7 +264,7 @@ func (c *Client) createCVOAWS(cvoDetails createCVOAWSDetails, clientID string) (

hostType := "CloudManagerHost"
params := structs.Map(cvoDetails)

log.Printf("Create AWS CVO: %#v\n", params)
statusCode, response, onCloudRequestID, err := c.CallAPIMethod("POST", baseURL, params, c.Token, hostType, clientID)
if err != nil {
log.Print("createCVO request failed ", statusCode)
Expand Down
2 changes: 1 addition & 1 deletion cloudmanager/cvo_azure.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ func (c *Client) createCVOAzure(cvoDetails createCVOAzureDetails, clientID strin

hostType := "CloudManagerHost"
params := structs.Map(cvoDetails)

log.Printf("Create AZURE CVO: %#v\n", params)
statusCode, response, onCloudRequestID, err := c.CallAPIMethod("POST", baseURL, params, c.Token, hostType, clientID)
if err != nil {
log.Print("createCVO request failed ", statusCode)
Expand Down
1 change: 1 addition & 0 deletions cloudmanager/cvo_gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ type createCVOGCPDetails struct {
Project string `structs:"project"`
CapacityTier string `structs:"capacityTier,omitempty"`
TierLevel string `structs:"tierLevel,omitempty"`
SaasSubscriptionID string `structs:"saasSubscriptionId,omitempty"`
NssAccount string `structs:"nssAccount,omitempty"`
WormRequest wormRequest `structs:"wormRequest,omitempty"`
WritingSpeedState string `structs:"writingSpeedState,omitempty"`
Expand Down
10 changes: 10 additions & 0 deletions cloudmanager/resource_netapp_cloudmanager_cvo_aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ func resourceCVOAWS() *schema.Resource {
Optional: true,
ForceNew: true,
},
"saas_subscription_id": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},
"worm_retention_period_length": {
Type: schema.TypeInt,
Optional: true,
Expand Down Expand Up @@ -400,6 +405,11 @@ func resourceCVOAWSCreate(d *schema.ResourceData, meta interface{}) error {
cvoDetails.AwsTags = expandUserTags(tags)
}
}

if c, ok := d.GetOk("saas_subscription_id"); ok {
cvoDetails.SaasSubscriptionID = c.(string)
}

cvoDetails.EbsVolumeSize.Size = d.Get("ebs_volume_size").(int)
cvoDetails.EbsVolumeSize.Unit = d.Get("ebs_volume_size_unit").(string)
cvoDetails.VsaMetadata.OntapVersion = d.Get("ontap_version").(string)
Expand Down
8 changes: 8 additions & 0 deletions cloudmanager/resource_netapp_cloudmanager_cvo_gcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,11 @@ func resourceCVOGCP() *schema.Resource {
Optional: true,
ValidateFunc: validation.StringInSlice([]string{"standard", "nearline", "coldline"}, false),
},
"saas_subscription_id": {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
},
"worm_retention_period_length": {
Type: schema.TypeInt,
Optional: true,
Expand Down Expand Up @@ -393,6 +398,9 @@ func resourceCVOGCPCreate(d *schema.ResourceData, meta interface{}) error {
if c, ok := d.GetOk("tier_level"); ok {
cvoDetails.TierLevel = c.(string)
}
if c, ok := d.GetOk("saas_subscription_id"); ok {
cvoDetails.SaasSubscriptionID = c.(string)
}
cvoDetails.GCPVolumeSize.Size = d.Get("gcp_volume_size").(int)
cvoDetails.GCPVolumeSize.Unit = d.Get("gcp_volume_size_unit").(string)
cvoDetails.VsaMetadata.OntapVersion = d.Get("ontap_version").(string)
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/cvo_aws.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ The following arguments are supported:
* `platform_serial_number` - (Optional) The serial number for the cluster. This is required when 'license_type' is set 'cot-premium-byol'.
* `capacity_tier` - (Optional) Whether to enable data tiering for the first data aggregate: ['S3','NONE']. The default is 'S3'.
* `tier_level` - (Optional) The tiering level when 'capacity_tier' is set to 'S3' ['normal','ia','ia-single','intelligent']. The default is 'normal'.
* `saas_subscription_id` - (Optional) SaaS Subscription ID. It is needed if the subscription is not paygo type.
* `nss_account` - (Optional) The NetApp Support Site account ID to use with this Cloud Volumes ONTAP system. If the license type is BYOL and an NSS account isn't provided, Cloud Manager tries to use the first existing NSS account.
* `writing_speed_state` - (Optional) The write speed setting for Cloud Volumes ONTAP: ['NORMAL','HIGH']. The default is 'NORMAL'. This argument is not relevant for HA pairs.
* `instance_tenancy` - (Optional) The EC2 instance tenancy: ['default','dedicated']. The default is 'default'.
Expand All @@ -151,6 +152,7 @@ The following arguments are supported:
* `route_table_ids` - (Optional) For HA FloatingIP, the list of route table IDs that will be updated with the floating IPs.
* `upgrade_ontap_version` - (Optional) Indicates whether to upgrade ontap image with `ontap_version`. To upgrade ontap image, `ontap_version` cannot be 'latest' and `use_latest_version` needs to be false.
* `mediator_security_group_id` - (Optional) For HA only, mediator security group id.
* `assume_role_arn` - (Optional) For HA only, Amazon Resource Name ARN of an AWS Identity and Access Managent IAM role that has created in the VPC owner account. For example, "arn:aws:iam::61239912384567:role/mediator_role_assume_fromdev"
* `retries` - (Optional) The number of attempts to wait for the completion of creating the CVO with 60 seconds apart for each attempt. For HA, this value is incremented by 30. The default is '60'.
* `worm_retention_period_length` - (Optional) WORM retention period length. Once specified retention period, the WORM is enabled. When WORM storage is activated, data tiering to object storage can’t be enabled.
* `worm_retention_period_unit` - (Optional) WORM retention period unit: ['years','months','days','hours','minutes','seconds'].
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/cvo_azure.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ The following arguments are supported:
* `serial_number` - (Optional) The serial number for the cluster. Required when using one of these: ['azure-cot-premium-byol' or 'azure-ha-cot-premium-byol'].
* `capacity_tier` - (Optional) Whether to enable data tiering for the first data aggregate: ['Blob', 'NONE']. The default is 'BLOB'.
* `tier_level` - (Optional) If capacity_tier is Blob, this argument indicates the tiering level: ['normal', 'cool']. The default is: 'normal'.
* `saas_subscription_id` - (Optional) SaaS Subscription ID. It is needed if the subscription is not paygo type.
* `nss_account` - (Optional) The NetApp Support Site account ID to use with this Cloud Volumes ONTAP system. If the license type is BYOL and an NSS account isn't provided, Cloud Manager tries to use the first existing NSS account.
* `writing_speed_state` - (Optional) The write speed setting for Cloud Volumes ONTAP: ['NORMAL','HIGH']. The default is 'NORMAL'. This argument is not relevant for HA pairs.
* `security_group_id` - (Optional) The name of the security group (full identifier: /subscriptions/xxxxxx/resourceGroups/rg_westus/providers/Microsoft.Network/networkSecurityGroups/CVO-SG). If not provided, Cloud Manager creates the security group.
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/cvo_gcp.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ The following arguments are supported:
* `serial_number` - (Optional) The serial number for the system. Required when using 'gcp-cot-premium-byol'.
* `capacity_tier` - (Optional) Indicates the type of data tiering to use: ['cloudStorage']. The default is 'cloudStorage'.
* `tier_level` - (Optional) In case capacity_tier is cloudStorage, this argument indicates the tiering level: ['standard', 'nearline', 'coldline']. The default is: 'standard'.
* `saas_subscription_id` - (Optional) SaaS Subscription ID. It is needed if the subscription is not paygo type.
* `nss_account` - (Optional) The NetApp Support Site account ID to use with this Cloud Volumes ONTAP system. If the license type is BYOL and an NSS account isn't provided, Cloud Manager tries to use the first existing NSS account.
* `writing_speed_state` - (Optional) The write speed setting for Cloud Volumes ONTAP: ['NORMAL','HIGH']. The default is 'NORMAL'. For single node system, HIGH write speed is supported with all machine types. For HA, Flash Cache, high write speed, and a higher maximum transmission unit (MTU) of 8,896 bytes are available through the High write speed option with the n2-standard-16, n2-standard-32, n2-standard-48, and n2-standard-64 instance types.
* `flash_cache` - (Optional) Enable Flash Cache. In GCP HA (version 9.13.0), HIGH write speed and FlashCache are coupled together both needs to be activated, one cannot be activated without the other.
Expand Down

0 comments on commit 7f518b5

Please sign in to comment.