Skip to content

Commit

Permalink
refreshing the provider for intersight version 17227 (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
vvb authored Aug 3, 2024
1 parent 52714bb commit a9c9ad9
Show file tree
Hide file tree
Showing 10,258 changed files with 292,808 additions and 38,255 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Change Logs

## v1.0.51
* Refreshes the terraform module to be in sync with the latest Cisco Intersight model (build 17227)

## v1.0.50
* Refreshes the terraform module to be in sync with the latest Cisco Intersight model (build 17057)

Expand Down
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME=intersight
VERSION=1.0.50
VERSION=1.0.51
TEST?=$$(go list ./... |grep -v 'vendor')
GOFMT_FILES?=$$(find . -name '*.go' |grep -v vendor)
WEBSITE_REPO=github.com/hashicorp/terraform-website
Expand Down
Empty file.
2 changes: 1 addition & 1 deletion examples/sample_modules/os_install/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
intersight = {
source = "CiscoDevNet/intersight"
version = "1.0.50"
version = "1.0.51"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/sample_modules/server_configurations/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
intersight = {
source = "CiscoDevNet/intersight"
version = "1.0.50"
version = "1.0.51"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/sample_modules/server_deployment/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
intersight = {
source = "CiscoDevNet/intersight"
version = "1.0.50"
version = "1.0.51"
}
}
}
Expand Down
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ require (
github.com/oklog/run v1.0.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/zclconf/go-cty v1.2.1 // indirect
golang.org/x/net v0.26.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/net v0.27.0 // indirect
golang.org/x/sys v0.22.0 // indirect
golang.org/x/text v0.16.0 // indirect
google.golang.org/appengine v1.6.6 // indirect
google.golang.org/genproto v0.0.0-20200825200019-8632dd797987 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
golang.org/x/net v0.27.0 h1:5K3Njcw06/l2y9vpGCSdcxWOYHOUk3dVNGDXN+FvAys=
golang.org/x/net v0.27.0/go.mod h1:dDi0PyhWNoiUOrAS8uXv/vnScO4wnHQO4mj9fn/RytE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down Expand Up @@ -374,8 +374,8 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI=
golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
Expand Down
80 changes: 80 additions & 0 deletions intersight/data_source_intersight_appliance_image_bundle.go
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,41 @@ func getApplianceImageBundleSchema() map[string]*schema.Schema {
Type: schema.TypeString,
Optional: true,
},
"requires": {
Description: "A reference to a applianceImageBundle resource.\nWhen the $expand query parameter is specified, the referenced resource is returned inline.",
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"additional_properties": {
Type: schema.TypeString,
Optional: true,
DiffSuppressFunc: SuppressDiffAdditionProps,
},
"class_id": {
Description: "The fully-qualified name of the instantiated, concrete type.\nThis property is used as a discriminator to identify the type of the payload\nwhen marshaling and unmarshaling data.",
Type: schema.TypeString,
Optional: true,
},
"moid": {
Description: "The Moid of the referenced REST resource.",
Type: schema.TypeString,
Optional: true,
},
"object_type": {
Description: "The fully-qualified name of the remote type referred by this relationship.",
Type: schema.TypeString,
Optional: true,
},
"selector": {
Description: "An OData $filter expression which describes the REST resource to be referenced. This field may\nbe set instead of 'moid' by clients.\n1. If 'moid' is set this field is ignored.\n1. If 'selector' is set and 'moid' is empty/absent from the request, Intersight determines the Moid of the\nresource matching the filter expression and populates it in the MoRef that is part of the object\ninstance being inserted/updated to fulfill the REST request.\nAn error is returned if the filter matches zero or more than one REST resource.\nAn example filter string is: Serial eq '3AA8B7T11'.",
Type: schema.TypeString,
Optional: true,
},
},
},
},
"service_packages": {
Type: schema.TypeList,
Optional: true,
Expand Down Expand Up @@ -1355,6 +1390,49 @@ func dataSourceApplianceImageBundleRead(c context.Context, d *schema.ResourceDat
o.SetReleaseTime(x)
}

if v, ok := d.GetOk("requires"); ok {
p := make([]models.ApplianceImageBundleRelationship, 0, 1)
s := v.([]interface{})
for i := 0; i < len(s); i++ {
l := s[i].(map[string]interface{})
o := &models.MoMoRef{}
if v, ok := l["additional_properties"]; ok {
{
x := []byte(v.(string))
var x1 interface{}
err := json.Unmarshal(x, &x1)
if err == nil && x1 != nil {
o.AdditionalProperties = x1.(map[string]interface{})
}
}
}
o.SetClassId("mo.MoRef")
if v, ok := l["moid"]; ok {
{
x := (v.(string))
o.SetMoid(x)
}
}
if v, ok := l["object_type"]; ok {
{
x := (v.(string))
o.SetObjectType(x)
}
}
if v, ok := l["selector"]; ok {
{
x := (v.(string))
o.SetSelector(x)
}
}
p = append(p, models.MoMoRefAsApplianceImageBundleRelationship(o))
}
if len(p) > 0 {
x := p[0]
o.SetRequires(x)
}
}

if v, ok := d.GetOk("service_packages"); ok {
x := make([]models.OnpremImagePackage, 0)
s := v.([]interface{})
Expand Down Expand Up @@ -1660,6 +1738,8 @@ func dataSourceApplianceImageBundleRead(c context.Context, d *schema.ResourceDat

temp["release_time"] = (s.GetReleaseTime()).String()

temp["requires"] = flattenMapApplianceImageBundleRelationship(s.GetRequires(), d)

temp["service_packages"] = flattenListOnpremImagePackage(s.GetServicePackages(), d)
temp["shared_scope"] = (s.GetSharedScope())
temp["status_message"] = (s.GetStatusMessage())
Expand Down
86 changes: 83 additions & 3 deletions intersight/data_source_intersight_appliance_upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func getApplianceUpgradeSchema() map[string]*schema.Schema {
Optional: true,
},
"name": {
Description: "Name of the upgrade phase.\n* `init` - Upgrade service initialization phase.\n* `CheckCluster` - For a multinode system, check that all nodes in the cluster are connected and running.\n* `SyncImages` - For a multinode system, sync image files between nodes.\n* `Prepare` - Upgrade service prepares folders and templated files.\n* `ServiceLoad` - Upgrade service loads the service images into the local docker cache.\n* `UiLoad` - Upgrade service loads the UI packages into the local cache.\n* `GenerateConfig` - Upgrade service generates the Kubernetes configuration files.\n* `DeployService` - Upgrade service deploys the Kubernetes services.\n* `UpgradeOS` - Run /opt/cisco/bin/onprem-upgrade-start.sh for each node.\n* `UpgradeServices` - Run /opt/cisco/bin/onprem-upgrade-start.sh per node.\n* `VerifyPlaybookSuccess` - Verify the upgrade playbook for UpgradeOS or UpgradeServices completed successfully.\n* `FinishUpgrade` - Run /opt/cisco/bin/onprem-upgrade-finish.sh for each node.\n* `Success` - Upgrade completed successfully.\n* `Fail` - Indicates that the upgrade process has failed.\n* `Cancel` - Indicates that the upgrade was canceled by the Intersight Appliance.\n* `Telemetry` - Upgrade service sends basic telemetry data to the Intersight.",
Description: "Name of the upgrade phase.\n* `init` - Upgrade service initialization phase.\n* `CheckCluster` - For a multinode system, check that all nodes in the cluster are connected and running.\n* `monitor` - Monitor a required upgrade.\n* `SyncImages` - For a multinode system, sync image files between nodes.\n* `Prepare` - Upgrade service prepares folders and templated files.\n* `ServiceLoad` - Upgrade service loads the service images into the local docker cache.\n* `UiLoad` - Upgrade service loads the UI packages into the local cache.\n* `GenerateConfig` - Upgrade service generates the Kubernetes configuration files.\n* `DeployService` - Upgrade service deploys the Kubernetes services.\n* `UpgradeOS` - Run /opt/cisco/bin/onprem-upgrade-start.sh for each node.\n* `UpgradeServices` - Run /opt/cisco/bin/onprem-upgrade-start.sh per node.\n* `VerifyPlaybookSuccess` - Verify the upgrade playbook for UpgradeOS or UpgradeServices completed successfully.\n* `FinishUpgrade` - Run /opt/cisco/bin/onprem-upgrade-finish.sh for each node.\n* `Success` - Upgrade completed successfully.\n* `Fail` - Indicates that the upgrade process has failed.\n* `Cancel` - Indicates that the upgrade was canceled by the Intersight Appliance.\n* `Telemetry` - Upgrade service sends basic telemetry data to the Intersight.",
Type: schema.TypeString,
Optional: true,
},
Expand Down Expand Up @@ -241,7 +241,7 @@ func getApplianceUpgradeSchema() map[string]*schema.Schema {
Optional: true,
},
"name": {
Description: "Name of the upgrade phase.\n* `init` - Upgrade service initialization phase.\n* `CheckCluster` - For a multinode system, check that all nodes in the cluster are connected and running.\n* `SyncImages` - For a multinode system, sync image files between nodes.\n* `Prepare` - Upgrade service prepares folders and templated files.\n* `ServiceLoad` - Upgrade service loads the service images into the local docker cache.\n* `UiLoad` - Upgrade service loads the UI packages into the local cache.\n* `GenerateConfig` - Upgrade service generates the Kubernetes configuration files.\n* `DeployService` - Upgrade service deploys the Kubernetes services.\n* `UpgradeOS` - Run /opt/cisco/bin/onprem-upgrade-start.sh for each node.\n* `UpgradeServices` - Run /opt/cisco/bin/onprem-upgrade-start.sh per node.\n* `VerifyPlaybookSuccess` - Verify the upgrade playbook for UpgradeOS or UpgradeServices completed successfully.\n* `FinishUpgrade` - Run /opt/cisco/bin/onprem-upgrade-finish.sh for each node.\n* `Success` - Upgrade completed successfully.\n* `Fail` - Indicates that the upgrade process has failed.\n* `Cancel` - Indicates that the upgrade was canceled by the Intersight Appliance.\n* `Telemetry` - Upgrade service sends basic telemetry data to the Intersight.",
Description: "Name of the upgrade phase.\n* `init` - Upgrade service initialization phase.\n* `CheckCluster` - For a multinode system, check that all nodes in the cluster are connected and running.\n* `monitor` - Monitor a required upgrade.\n* `SyncImages` - For a multinode system, sync image files between nodes.\n* `Prepare` - Upgrade service prepares folders and templated files.\n* `ServiceLoad` - Upgrade service loads the service images into the local docker cache.\n* `UiLoad` - Upgrade service loads the UI packages into the local cache.\n* `GenerateConfig` - Upgrade service generates the Kubernetes configuration files.\n* `DeployService` - Upgrade service deploys the Kubernetes services.\n* `UpgradeOS` - Run /opt/cisco/bin/onprem-upgrade-start.sh for each node.\n* `UpgradeServices` - Run /opt/cisco/bin/onprem-upgrade-start.sh per node.\n* `VerifyPlaybookSuccess` - Verify the upgrade playbook for UpgradeOS or UpgradeServices completed successfully.\n* `FinishUpgrade` - Run /opt/cisco/bin/onprem-upgrade-finish.sh for each node.\n* `Success` - Upgrade completed successfully.\n* `Fail` - Indicates that the upgrade process has failed.\n* `Cancel` - Indicates that the upgrade was canceled by the Intersight Appliance.\n* `Telemetry` - Upgrade service sends basic telemetry data to the Intersight.",
Type: schema.TypeString,
Optional: true,
},
Expand Down Expand Up @@ -495,6 +495,41 @@ func getApplianceUpgradeSchema() map[string]*schema.Schema {
},
},
},
"requires": {
Description: "A reference to a applianceUpgrade resource.\nWhen the $expand query parameter is specified, the referenced resource is returned inline.",
Type: schema.TypeList,
MaxItems: 1,
Optional: true,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"additional_properties": {
Type: schema.TypeString,
Optional: true,
DiffSuppressFunc: SuppressDiffAdditionProps,
},
"class_id": {
Description: "The fully-qualified name of the instantiated, concrete type.\nThis property is used as a discriminator to identify the type of the payload\nwhen marshaling and unmarshaling data.",
Type: schema.TypeString,
Optional: true,
},
"moid": {
Description: "The Moid of the referenced REST resource.",
Type: schema.TypeString,
Optional: true,
},
"object_type": {
Description: "The fully-qualified name of the remote type referred by this relationship.",
Type: schema.TypeString,
Optional: true,
},
"selector": {
Description: "An OData $filter expression which describes the REST resource to be referenced. This field may\nbe set instead of 'moid' by clients.\n1. If 'moid' is set this field is ignored.\n1. If 'selector' is set and 'moid' is empty/absent from the request, Intersight determines the Moid of the\nresource matching the filter expression and populates it in the MoRef that is part of the object\ninstance being inserted/updated to fulfill the REST request.\nAn error is returned if the filter matches zero or more than one REST resource.\nAn example filter string is: Serial eq '3AA8B7T11'.",
Type: schema.TypeString,
Optional: true,
},
},
},
},
"rollback_needed": {
Description: "Track if rollback is needed.",
Type: schema.TypeBool,
Expand Down Expand Up @@ -546,7 +581,7 @@ func getApplianceUpgradeSchema() map[string]*schema.Schema {
Optional: true,
},
"name": {
Description: "Name of the upgrade phase.\n* `init` - Upgrade service initialization phase.\n* `CheckCluster` - For a multinode system, check that all nodes in the cluster are connected and running.\n* `SyncImages` - For a multinode system, sync image files between nodes.\n* `Prepare` - Upgrade service prepares folders and templated files.\n* `ServiceLoad` - Upgrade service loads the service images into the local docker cache.\n* `UiLoad` - Upgrade service loads the UI packages into the local cache.\n* `GenerateConfig` - Upgrade service generates the Kubernetes configuration files.\n* `DeployService` - Upgrade service deploys the Kubernetes services.\n* `UpgradeOS` - Run /opt/cisco/bin/onprem-upgrade-start.sh for each node.\n* `UpgradeServices` - Run /opt/cisco/bin/onprem-upgrade-start.sh per node.\n* `VerifyPlaybookSuccess` - Verify the upgrade playbook for UpgradeOS or UpgradeServices completed successfully.\n* `FinishUpgrade` - Run /opt/cisco/bin/onprem-upgrade-finish.sh for each node.\n* `Success` - Upgrade completed successfully.\n* `Fail` - Indicates that the upgrade process has failed.\n* `Cancel` - Indicates that the upgrade was canceled by the Intersight Appliance.\n* `Telemetry` - Upgrade service sends basic telemetry data to the Intersight.",
Description: "Name of the upgrade phase.\n* `init` - Upgrade service initialization phase.\n* `CheckCluster` - For a multinode system, check that all nodes in the cluster are connected and running.\n* `monitor` - Monitor a required upgrade.\n* `SyncImages` - For a multinode system, sync image files between nodes.\n* `Prepare` - Upgrade service prepares folders and templated files.\n* `ServiceLoad` - Upgrade service loads the service images into the local docker cache.\n* `UiLoad` - Upgrade service loads the UI packages into the local cache.\n* `GenerateConfig` - Upgrade service generates the Kubernetes configuration files.\n* `DeployService` - Upgrade service deploys the Kubernetes services.\n* `UpgradeOS` - Run /opt/cisco/bin/onprem-upgrade-start.sh for each node.\n* `UpgradeServices` - Run /opt/cisco/bin/onprem-upgrade-start.sh per node.\n* `VerifyPlaybookSuccess` - Verify the upgrade playbook for UpgradeOS or UpgradeServices completed successfully.\n* `FinishUpgrade` - Run /opt/cisco/bin/onprem-upgrade-finish.sh for each node.\n* `Success` - Upgrade completed successfully.\n* `Fail` - Indicates that the upgrade process has failed.\n* `Cancel` - Indicates that the upgrade was canceled by the Intersight Appliance.\n* `Telemetry` - Upgrade service sends basic telemetry data to the Intersight.",
Type: schema.TypeString,
Optional: true,
},
Expand Down Expand Up @@ -1188,6 +1223,49 @@ func dataSourceApplianceUpgradeRead(c context.Context, d *schema.ResourceData, m
o.SetPermissionResources(x)
}

if v, ok := d.GetOk("requires"); ok {
p := make([]models.ApplianceUpgradeRelationship, 0, 1)
s := v.([]interface{})
for i := 0; i < len(s); i++ {
l := s[i].(map[string]interface{})
o := &models.MoMoRef{}
if v, ok := l["additional_properties"]; ok {
{
x := []byte(v.(string))
var x1 interface{}
err := json.Unmarshal(x, &x1)
if err == nil && x1 != nil {
o.AdditionalProperties = x1.(map[string]interface{})
}
}
}
o.SetClassId("mo.MoRef")
if v, ok := l["moid"]; ok {
{
x := (v.(string))
o.SetMoid(x)
}
}
if v, ok := l["object_type"]; ok {
{
x := (v.(string))
o.SetObjectType(x)
}
}
if v, ok := l["selector"]; ok {
{
x := (v.(string))
o.SetSelector(x)
}
}
p = append(p, models.MoMoRefAsApplianceUpgradeRelationship(o))
}
if len(p) > 0 {
x := p[0]
o.SetRequires(x)
}
}

if v, ok := d.GetOkExists("rollback_needed"); ok {
x := (v.(bool))
o.SetRollbackNeeded(x)
Expand Down Expand Up @@ -1459,6 +1537,8 @@ func dataSourceApplianceUpgradeRead(c context.Context, d *schema.ResourceData, m
temp["parent"] = flattenMapMoBaseMoRelationship(s.GetParent(), d)

temp["permission_resources"] = flattenListMoBaseMoRelationship(s.GetPermissionResources(), d)

temp["requires"] = flattenMapApplianceUpgradeRelationship(s.GetRequires(), d)
temp["rollback_needed"] = (s.GetRollbackNeeded())

temp["rollback_phases"] = flattenListOnpremUpgradePhase(s.GetRollbackPhases(), d)
Expand Down
Loading

0 comments on commit a9c9ad9

Please sign in to comment.