From ddfbc813e58b0823ea2b33bd9f34f64571470d90 Mon Sep 17 00:00:00 2001 From: Diptipowervs Date: Fri, 29 Dec 2023 14:44:22 +0530 Subject: [PATCH 01/11] dhcp data source --- ibm/service/power/data_source_ibm_pi_dhcp.go | 73 ++++++++----------- .../power/data_source_ibm_pi_dhcp_test.go | 1 - ibm/service/power/data_source_ibm_pi_dhcps.go | 63 +++++++--------- .../power/data_source_ibm_pi_dhcps_test.go | 1 - website/docs/d/pi_dhcp.html.markdown | 53 ++++++-------- website/docs/d/pi_dhcps.html.markdown | 49 ++++++------- 6 files changed, 101 insertions(+), 139 deletions(-) diff --git a/ibm/service/power/data_source_ibm_pi_dhcp.go b/ibm/service/power/data_source_ibm_pi_dhcp.go index c6e716c020..9b5de8f4ef 100644 --- a/ibm/service/power/data_source_ibm_pi_dhcp.go +++ b/ibm/service/power/data_source_ibm_pi_dhcp.go @@ -6,15 +6,12 @@ package power import ( "context" "fmt" - "log" - st "github.com/IBM-Cloud/power-go-client/clients/instance" + "github.com/IBM-Cloud/power-go-client/clients/instance" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" - "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) @@ -22,103 +19,95 @@ func DataSourceIBMPIDhcp() *schema.Resource { return &schema.Resource{ ReadContext: dataSourceIBMPIDhcpRead, Schema: map[string]*schema.Schema{ - - // Required Arguments + // Arguments Arg_CloudInstanceID: { - Type: schema.TypeString, + Description: "The GUID of the service instance associated with an account.", Required: true, + Type: schema.TypeString, ValidateFunc: validation.NoZeroValues, }, Arg_DhcpID: { - Type: schema.TypeString, + Description: "ID of the DHCP Server.", Required: true, - Description: "The ID of the DHCP Server", + Type: schema.TypeString, }, // Attributes Attr_DhcpID: { - Type: schema.TypeString, Computed: true, - Description: "The ID of the DHCP Server", + Description: "ID of the DHCP Server.", + Type: schema.TypeString, }, - Attr_DhcpLeases: { - Type: schema.TypeList, + Attr_Leases: { Computed: true, - Description: "The list of DHCP Server PVM Instance leases", + Description: "List of DHCP Server PVM Instance leases.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ Attr_DhcpLeaseInstanceIP: { - Type: schema.TypeString, Computed: true, - Description: "The IP of the PVM Instance", + Description: "IP of the PVM Instance.", + Type: schema.TypeString, }, Attr_DhcpLeaseInstanceMac: { - Type: schema.TypeString, Computed: true, - Description: "The MAC Address of the PVM Instance", + Description: "MAC Address of the PVM Instance.", + Type: schema.TypeString, }, }, }, + Type: schema.TypeList, }, Attr_DhcpNetworkDeprecated: { - Type: schema.TypeString, Computed: true, - Description: "The ID of the DHCP Server private network (deprecated - replaced by network_id)", - }, - Attr_DhcpNetworkID: { + Description: "ID of the DHCP Server private network (deprecated - replaced by network_id)", Type: schema.TypeString, - Computed: true, - Description: "The ID of the DHCP Server private network", }, - Attr_DhcpNetworkName: { - Type: schema.TypeString, + Attr_NetworkID: { Computed: true, - Description: "The name of the DHCP Server private network", + Description: "ID of the DHCP Server private network.", + Type: schema.TypeString, }, - Attr_DhcpStatus: { + Attr_NetworkName: { + Computed: true, + Description: "Name of the DHCP Server private network.", Type: schema.TypeString, + }, + Attr_Status: { Computed: true, - Description: "The status of the DHCP Server", + Description: "Status of the DHCP Server.", + Type: schema.TypeString, }, }, } } func dataSourceIBMPIDhcpRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - - // session sess, err := meta.(conns.ClientSession).IBMPISession() if err != nil { return diag.FromErr(err) } - // arguments cloudInstanceID := d.Get(Arg_CloudInstanceID).(string) dhcpID := d.Get(Arg_DhcpID).(string) - - // client - client := st.NewIBMPIDhcpClient(ctx, sess, cloudInstanceID) - - // get dhcp + client := instance.NewIBMPIDhcpClient(ctx, sess, cloudInstanceID) dhcpServer, err := client.Get(dhcpID) if err != nil { log.Printf("[DEBUG] get DHCP failed %v", err) return diag.FromErr(err) } - // set attributes d.SetId(fmt.Sprintf("%s/%s", cloudInstanceID, *dhcpServer.ID)) d.Set(Attr_DhcpID, *dhcpServer.ID) - d.Set(Attr_DhcpStatus, *dhcpServer.Status) + d.Set(Attr_Status, *dhcpServer.Status) if dhcpServer.Network != nil { dhcpNetwork := dhcpServer.Network if dhcpNetwork.ID != nil { d.Set(Attr_DhcpNetworkDeprecated, *dhcpNetwork.ID) - d.Set(Attr_DhcpNetworkID, *dhcpNetwork.ID) + d.Set(Attr_NetworkID, *dhcpNetwork.ID) } if dhcpNetwork.Name != nil { - d.Set(Attr_DhcpNetworkName, *dhcpNetwork.Name) + d.Set(Attr_NetworkName, *dhcpNetwork.Name) } } @@ -130,7 +119,7 @@ func dataSourceIBMPIDhcpRead(ctx context.Context, d *schema.ResourceData, meta i Attr_DhcpLeaseInstanceMac: *lease.InstanceMacAddress, } } - d.Set(Attr_DhcpLeases, leaseList) + d.Set(Attr_Leases, leaseList) } return nil diff --git a/ibm/service/power/data_source_ibm_pi_dhcp_test.go b/ibm/service/power/data_source_ibm_pi_dhcp_test.go index 8db9170a35..76eecbe42f 100644 --- a/ibm/service/power/data_source_ibm_pi_dhcp_test.go +++ b/ibm/service/power/data_source_ibm_pi_dhcp_test.go @@ -13,7 +13,6 @@ import ( ) func TestAccIBMPIDhcpDataSourceBasic(t *testing.T) { - resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/ibm/service/power/data_source_ibm_pi_dhcps.go b/ibm/service/power/data_source_ibm_pi_dhcps.go index a95f1935b5..ef52be36da 100644 --- a/ibm/service/power/data_source_ibm_pi_dhcps.go +++ b/ibm/service/power/data_source_ibm_pi_dhcps.go @@ -7,107 +7,94 @@ import ( "context" "log" - st "github.com/IBM-Cloud/power-go-client/clients/instance" + "github.com/IBM-Cloud/power-go-client/clients/instance" "github.com/IBM-Cloud/terraform-provider-ibm/ibm/conns" "github.com/hashicorp/go-uuid" "github.com/hashicorp/terraform-plugin-sdk/v2/diag" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation" ) -/* -Datasource to get the list of dhcp servers in a power instance -*/ - +// Datasource to list dhcp servers in a power instance func DataSourceIBMPIDhcps() *schema.Resource { - return &schema.Resource{ ReadContext: dataSourceIBMPIDhcpServersRead, Schema: map[string]*schema.Schema{ - - // Required Arguments + // Arguments Arg_CloudInstanceID: { - Type: schema.TypeString, + Description: "The GUID of the service instance associated with an account.", Required: true, + Type: schema.TypeString, ValidateFunc: validation.NoZeroValues, }, // Attributes Attr_DhcpServers: { - Type: schema.TypeList, Computed: true, - Description: "The list of all the DHCP Servers", + Description: "List of all the DHCP Servers.", Elem: &schema.Resource{ Schema: map[string]*schema.Schema{ Attr_DhcpID: { - Type: schema.TypeString, Computed: true, - Description: "The ID of the DHCP Server", + Description: "ID of the DHCP Server.", + Type: schema.TypeString, }, Attr_DhcpNetworkDeprecated: { - Type: schema.TypeString, Computed: true, - Description: "The ID of the DHCP Server private network (deprecated - replaced by network_id)", - }, - Attr_DhcpNetworkID: { + Description: "ID of the DHCP Server private network (deprecated - replaced by network_id)", Type: schema.TypeString, - Computed: true, - Description: "The ID of the DHCP Server private network", }, - Attr_DhcpNetworkName: { - Type: schema.TypeString, + Attr_NetworkID: { Computed: true, - Description: "The name of the DHCP Server private network", + Description: "ID of the DHCP Server private network.", + Type: schema.TypeString, }, - Attr_DhcpStatus: { + Attr_NetworkName: { + Computed: true, + Description: "Name of the DHCP Server private network.", Type: schema.TypeString, + }, + Attr_Status: { Computed: true, - Description: "The status of the DHCP Server", + Description: "Status of the DHCP Server.", + Type: schema.TypeString, }, }, }, + Type: schema.TypeList, }, }, } } func dataSourceIBMPIDhcpServersRead(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics { - - // session and client sess, err := meta.(conns.ClientSession).IBMPISession() if err != nil { return diag.FromErr(err) } - // arguments cloudInstanceID := d.Get(Arg_CloudInstanceID).(string) - - // client - client := st.NewIBMPIDhcpClient(ctx, sess, cloudInstanceID) - - // get all dhcp + client := instance.NewIBMPIDhcpClient(ctx, sess, cloudInstanceID) dhcpServers, err := client.GetAll() if err != nil { log.Printf("[DEBUG] get all DHCP failed %v", err) return diag.FromErr(err) } - // set attributes servers := make([]map[string]interface{}, 0, len(dhcpServers)) for _, dhcpServer := range dhcpServers { server := map[string]interface{}{ - Attr_DhcpID: *dhcpServer.ID, - Attr_DhcpStatus: *dhcpServer.Status, + Attr_DhcpID: *dhcpServer.ID, + Attr_Status: *dhcpServer.Status, } if dhcpServer.Network != nil { dhcpNetwork := dhcpServer.Network if dhcpNetwork.ID != nil { d.Set(Attr_DhcpNetworkDeprecated, *dhcpNetwork.ID) - d.Set(Attr_DhcpNetworkID, *dhcpNetwork.ID) + d.Set(Attr_NetworkID, *dhcpNetwork.ID) } if dhcpNetwork.Name != nil { - d.Set(Attr_DhcpNetworkName, *dhcpNetwork.Name) + d.Set(Attr_NetworkName, *dhcpNetwork.Name) } } servers = append(servers, server) diff --git a/ibm/service/power/data_source_ibm_pi_dhcps_test.go b/ibm/service/power/data_source_ibm_pi_dhcps_test.go index 84645bae3c..ec787992ea 100644 --- a/ibm/service/power/data_source_ibm_pi_dhcps_test.go +++ b/ibm/service/power/data_source_ibm_pi_dhcps_test.go @@ -13,7 +13,6 @@ import ( ) func TestAccIBMPIDhcpServersDataSourceBasic(t *testing.T) { - resource.Test(t, resource.TestCase{ PreCheck: func() { acc.TestAccPreCheck(t) }, Providers: acc.TestAccProviders, diff --git a/website/docs/d/pi_dhcp.html.markdown b/website/docs/d/pi_dhcp.html.markdown index cf6f1221d5..89c3534cd0 100644 --- a/website/docs/d/pi_dhcp.html.markdown +++ b/website/docs/d/pi_dhcp.html.markdown @@ -1,5 +1,4 @@ --- - subcategory: "Power Systems" layout: "ibm" page_title: "IBM: pi_dhcp" @@ -8,11 +7,9 @@ description: |- --- # ibm_pi_dhcp - Retrieve information about a DHCP Server. For more information, see [getting started with IBM Power Systems Virtual Servers](https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-getting-started). ## Example usage - ```terraform data "ibm_pi_dhcp" "example" { pi_cloud_instance_id = "" @@ -20,37 +17,35 @@ data "ibm_pi_dhcp" "example" { } ``` +**Notes** +- Please find [supported Regions](https://cloud.ibm.com/apidocs/power-cloud#endpoint) for endpoints. +- If a Power cloud instance is provisioned at `lon04`, The provider level attributes should be as follows: + - `region` - `lon` + - `zone` - `lon04` + +Example usage: + ```terraform + provider "ibm" { + region = "lon" + zone = "lon04" + } + ``` + ## Argument reference Review the argument references that you can specify for your data source. -- `pi_cloud_instance_id` - (Required, String) Cloud Instance ID of a PCloud Instance. -- `pi_dhcp_id` - (Required, String) The ID of the DHCP Server. +- `pi_cloud_instance_id` - (Required, String) The GUID of the service instance associated with an account. +- `pi_dhcp_id` - (Required, String) ID of the DHCP Server. ## Attribute reference In addition to all argument reference list, you can access the following attribute references after your data source is created. -- `id` - (String) The ID of the DHCP Server. -- `leases` - (List) The list of DHCP Server PVM Instance leases. +- `dhcp_id` - (String) ID of the DHCP Server. +- `leases` - (List) List of DHCP Server PVM Instance leases. Nested scheme for `leases`: - - `instance_ip` - (String) The IP of the PVM Instance. - - `instance_mac` - (String) The MAC Address of the PVM Instance. -- `network` - (String) The ID of the DHCP Server private network (deprecated - replaced by `network_id`). -- `network_id`- (String) The ID of the DHCP Server private network. -- `network_name` - The name of the DHCP Server private network. -- `status` - (String) The status of the DHCP Server. - -**Note** - -* Please find [supported Regions](https://cloud.ibm.com/apidocs/power-cloud#endpoint) for endpoints. -* If a Power cloud instance is provisioned at `lon04`, The provider level attributes should be as follows: - * `region` - `lon` - * `zone` - `lon04` - -Example usage: - - ```terraform - provider "ibm" { - region = "lon" - zone = "lon04" - } - ``` \ No newline at end of file + - `instance_ip` - (String) IP of the PVM Instance. + - `instance_mac` - (String) MAC Address of the PVM Instance. +- `network` - (String) ID of the DHCP Server private network (deprecated - replaced by `network_id`). +- `network_id`- (String) ID of the DHCP Server private network. +- `network_name` - (String) Name of the DHCP Server private network. +- `status` - (String) Status of the DHCP Server. diff --git a/website/docs/d/pi_dhcps.html.markdown b/website/docs/d/pi_dhcps.html.markdown index edc89f2dd5..eeb180a553 100644 --- a/website/docs/d/pi_dhcps.html.markdown +++ b/website/docs/d/pi_dhcps.html.markdown @@ -1,5 +1,4 @@ --- - subcategory: "Power Systems" layout: "ibm" page_title: "IBM: pi_dhcps" @@ -8,48 +7,42 @@ description: |- --- # ibm_pi_dhcps - Retrieve information about all DHCP Servers. For more information, see [getting started with IBM Power Systems Virtual Servers](https://cloud.ibm.com/docs/power-iaas?topic=power-iaas-getting-started). ## Example usage - ```terraform data "ibm_pi_dhcps" "example" { pi_cloud_instance_id = "" } ``` -## Argument reference +**Notes** +- Please find [supported Regions](https://cloud.ibm.com/apidocs/power-cloud#endpoint) for endpoints. +- If a Power cloud instance is provisioned at `lon04`, The provider level attributes should be as follows: + - `region` - `lon` + - `zone` - `lon04` +Example usage: + ```terraform + provider "ibm" { + region = "lon" + zone = "lon04" + } + ``` + +## Argument reference Review the argument references that you can specify for your data source. -- `pi_cloud_instance_id` - (Required, String) Cloud Instance ID of a PCloud Instance. +- `pi_cloud_instance_id` - (Required, String) The GUID of the service instance associated with an account. ## Attribute reference - In addition to all argument reference list, you can access the following attribute references after your data source is created. -- `servers` - (List) The list of all the DHCP Servers. +- `servers` - (List) List of all the DHCP Servers. Nested scheme for `servers`: - - `dhcp_id` - (String) The ID of the DHCP Server. - - `network` - (String) The ID of the DHCP Server private network (deprecated - replaced by `network_id`). - - `network_id`- (String) The ID of the DHCP Server private network. - - `network_name` - The name of the DHCP Server private network. - - `status` - (String) The status of the DHCP Server. - -**Notes** - -* Please find [supported Regions](https://cloud.ibm.com/apidocs/power-cloud#endpoint) for endpoints. -* If a Power cloud instance is provisioned at `lon04`, The provider level attributes should be as follows: - * `region` - `lon` - * `zone` - `lon04` - -Example usage: - - ```terraform - provider "ibm" { - region = "lon" - zone = "lon04" - } - ``` \ No newline at end of file + - `dhcp_id` - (String) ID of the DHCP Server. + - `network` - (String) ID of the DHCP Server private network (deprecated - replaced by `network_id`). + - `network_id`- (String) ID of the DHCP Server private network. + - `network_name` - (String) Name of the DHCP Server private network. + - `status` - (String) Status of the DHCP Server. From a034fe393d39c95bdd259bf63a5a913daf0371b3 Mon Sep 17 00:00:00 2001 From: Diptipowervs Date: Fri, 29 Dec 2023 14:52:22 +0530 Subject: [PATCH 02/11] dhcp data source --- ibm/service/power/ibm_pi_constants.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ibm/service/power/ibm_pi_constants.go b/ibm/service/power/ibm_pi_constants.go index 8e66a4bd83..17cb40b45c 100644 --- a/ibm/service/power/ibm_pi_constants.go +++ b/ibm/service/power/ibm_pi_constants.go @@ -15,6 +15,9 @@ const ( Attr_KeyCreationDate = "creation_date" Attr_Key = "ssh_key" Attr_KeyName = "name" + Attr_Leases = "leases" + Attr_NetworkID = "network_id" + Attr_NetworkName = "network_name" // SAP Profile PISAPProfiles = "profiles" From 58ba3cfd77bc8e4ae10f0290a35ee24262104611 Mon Sep 17 00:00:00 2001 From: Diptipowervs Date: Fri, 5 Jan 2024 12:45:15 +0530 Subject: [PATCH 03/11] Add missing constants to ibm_ pi_constants.go --- ibm/service/power/ibm_pi_constants.go | 333 +++++++++++++++++++++----- 1 file changed, 272 insertions(+), 61 deletions(-) diff --git a/ibm/service/power/ibm_pi_constants.go b/ibm/service/power/ibm_pi_constants.go index 17cb40b45c..6322247a96 100644 --- a/ibm/service/power/ibm_pi_constants.go +++ b/ibm/service/power/ibm_pi_constants.go @@ -3,21 +3,252 @@ package power import "time" const ( - // used by all - Arg_CloudInstanceID = "pi_cloud_instance_id" - - // Keys - Arg_KeyName = "pi_key_name" - Arg_Key = "pi_ssh_key" - - Attr_KeyID = "key_id" - Attr_Keys = "keys" - Attr_KeyCreationDate = "creation_date" - Attr_Key = "ssh_key" - Attr_KeyName = "name" - Attr_Leases = "leases" - Attr_NetworkID = "network_id" - Attr_NetworkName = "network_name" + // Arguments + Arg_CloudConnectionName = "pi_cloud_connection_name" + Arg_CloudInstanceID = "pi_cloud_instance_id" + Arg_ImageName = "pi_image_name" + Arg_InstanceName = "pi_instance_name" + Arg_Key = "pi_ssh_key" + Arg_KeyName = "pi_key_name" + Arg_NetworkName = "pi_network_name" + Arg_PlacementGroupName = "pi_placement_group_name" + Arg_SAP = "sap" + Arg_SAPProfileID = "pi_sap_profile_id" + Arg_SPPPlacementGroupID = "pi_spp_placement_group_id" + Arg_SPPPlacementGroupName = "pi_spp_placement_group_name" + Arg_SPPPlacementGroupPolicy = "pi_spp_placement_group_policy" + Arg_SharedProcessorPoolHostGroup = "pi_shared_processor_pool_host_group" + Arg_SharedProcessorPoolID = "pi_shared_processor_pool_id" + Arg_SharedProcessorPoolName = "pi_shared_processor_pool_name" + Arg_SharedProcessorPoolPlacementGroupID = "pi_shared_processor_pool_placement_group_id" + Arg_SharedProcessorPoolReservedCores = "pi_shared_processor_pool_reserved_cores" + Arg_StoragePool = "pi_storage_pool" + Arg_StorageType = "pi_storage_type" + Arg_VTL = "vtl" + Arg_VolumeGroupID = "pi_volume_group_id" + Arg_VolumeID = "pi_volume_id" + Arg_VolumeOnboardingID = "pi_volume_onboarding_id" + + // Attributes + Attr_AccessConfig = "access_config" + Attr_Action = "action" + Attr_Addresses = "addresses" + Attr_AllocatedCores = "allocated_cores" + Attr_Architecture = "architecture" + Attr_Auxiliary = "auxiliary" + Attr_AuxiliaryChangedVolumeName = "auxiliary_changed_volume_name" + Attr_AuxiliaryVolumeName = "auxiliary_volume_name" + Attr_AvailabilityZone = "availability_zone" + Attr_AvailableCores = "available_cores" + Attr_AvailableIPCount = "available_ip_count" + Attr_BootVolumeID = "boot_volume_id" + Attr_Bootable = "bootable" + Attr_CIDR = "cidr" + Attr_CPUs = "cpus" + Attr_CRN = "crn" + Attr_Capabilities = "capabilities" + Attr_Capacity = "capacity" + Attr_Certified = "certified" + Attr_ClassicEnabled = "classic_enabled" + Attr_CloudConnectionID = "cloud_connection_id" + Attr_CloudInstanceID = "cloud_instance_id" + Attr_CloudInstances = "cloud_instances" + Attr_Code = "code" + Attr_ConnectionMode = "connection_mode" + Attr_Connections = "connections" + Attr_ConsistencyGroupName = "consistency_group_name" + Attr_ConsoleLanguages = "console_languages" + Attr_ContainerFormat = "container_format" + Attr_CopyRate = "copy_rate" + Attr_CopyType = "copy_type" + Attr_CoreMemoryRatio = "core_memory_ratio" + Attr_Cores = "cores" + Attr_CreateTime = "create_time" + Attr_CreationDate = "creation_date" + Attr_CyclePeriodSeconds = "cycle_period_seconds" + Attr_CyclingMode = "cycling_mode" + Attr_DNS = "dns" + Attr_Datacenters = "datacenters" + Attr_Default = "default" + Attr_DeploymentType = "deployment_type" + Attr_Description = "description" + Attr_DisasterRecoveryLocations = "disaster_recovery_locations" + Attr_DiskFormat = "disk_format" + Attr_DiskType = "disk_type" + Attr_Enabled = "enabled" + Attr_Endianness = "endianness" + Attr_ExternalIP = "external_ip" + Attr_FailureMessage = "failure_message" + Attr_FlashCopyMappings = "flash_copy_mappings" + Attr_FlashCopyName = "flash_copy_name" + Attr_FreezeTime = "freeze_time" + Attr_Gateway = "gateway" + Attr_GlobalRouting = "global_routing" + Attr_GreDestinationAddress = "gre_destination_address" + Attr_GreSourceAddress = "gre_source_address" + Attr_GroupID = "group_id" + Attr_HealthStatus = "health_status" + Attr_HostID = "host_id" + Attr_Href = "href" + Attr_Hypervisor = "hypervisor" + Attr_HypervisorType = "hypervisor_type" + Attr_IBMIPAddress = "ibm_ip_address" + Attr_ID = "id" + Attr_IP = "ip" + Attr_IPAddress = "ipaddress" + Attr_IPOctet = "ipoctet" + Attr_ImageID = "image_id" + Attr_ImageInfo = "image_info" + Attr_ImageType = "image_type" + Attr_Images = "images" + Attr_InputVolumes = "input_volumes" + Attr_InstanceSnapshots = "instance_snapshots" + Attr_InstanceVolumes = "instance_volumes" + Attr_Instances = "instances" + Attr_IsActive = "is_active" + Attr_Jumbo = "jumbo" + Attr_Key = "key" + Attr_KeyCreationDate = "creation_date" + Attr_KeyID = "key_id" + Attr_KeyName = "name" + Attr_Keys = "keys" + Attr_Language = "language" + Attr_LastUpdateDate = "last_update_date" + Attr_LastUpdatedDate = "last_updated_date" + Attr_Leases = "leases" + Attr_LicenseRepositoryCapacity = "license_repository_capacity" + Attr_Location = "location" + Attr_MTU = "mtu" + Attr_MacAddress = "macaddress" + Attr_MasterChangedVolumeName = "master_changed_volume_name" + Attr_MasterVolumeName = "master_volume_name" + Attr_Max = "max" + Attr_MaxAllocationSize = "max_allocation_size" + Attr_MaxAvailable = "max_available" + Attr_MaxCoresAvailable = "max_cores_available" + Attr_MaxMem = "maxmem" + Attr_MaxMemoryAvailable = "max_memory_available" + Attr_MaxProc = "maxproc" + Attr_MaxVirtualCores = "max_virtual_cores" + Attr_MaximumStorageAllocation = "max_storage_allocation" + Attr_Members = "members" + Attr_Memory = "memory" + Attr_Message = "message" + Attr_Metered = "metered" + Attr_Min = "min" + Attr_MinMem = "minmem" + Attr_MinProc = "minproc" + Attr_MinVirtualCores = "min_virtual_cores" + Attr_MirroringState = "mirroring_state" + Attr_Name = "name" + Attr_NetworkID = "network_id" + Attr_NetworkName = "network_name" + Attr_NetworkPorts = "network_ports" + Attr_Networks = "networks" + Attr_NumberOfVolumes = "number_of_volumes" + Attr_Onboardings = "onboardings" + Attr_OperatingSystem = "operating_system" + Attr_PVMInstanceID = "pvm_instance_id" + Attr_PVMInstances = "pvm_instances" + Attr_PVMSnapshots = "pvm_snapshots" + Attr_PercentComplete = "percent_complete" + Attr_PinPolicy = "pin_policy" + Attr_PlacementGroupID = "placement_group_id" + Attr_PlacementGroups = "placement_groups" + Attr_Policy = "policy" + Attr_Pool = "pool" + Attr_PoolName = "pool_name" + Attr_Port = "port" + Attr_PortID = "portid" + Attr_PrimaryRole = "primary_role" + Attr_ProcType = "proctype" + Attr_Processors = "processors" + Attr_ProfileID = "profile_id" + Attr_Profiles = "profiles" + Attr_Progress = "progress" + Attr_PublicIP = "public_ip" + Attr_Region = "region" + Attr_RemoteCopyID = "remote_copy_id" + Attr_RemoteCopyRelationshipNames = "remote_copy_relationship_names" + Attr_RemoteCopyRelationships = "remote_copy_relationships" + Attr_ReplicationEnabled = "replication_enabled" + Attr_ReplicationSites = "replication_sites" + Attr_ReplicationStatus = "replication_status" + Attr_ReplicationType = "replication_type" + Attr_ReservedCores = "reserved_cores" + Attr_ResultsOnboardedVolumes = "results_onboarded_volumes" + Attr_ResultsVolumeOnboardingFailures = "results_volume_onboarding_failures" + Attr_SPPPlacementGroups = "spp_placement_groups" + Attr_SSHKey = "ssh_key" + Attr_Shareable = "shreable" + Attr_SharedCoreRatio = "shared_core_ratio" + Attr_SharedProcessorPool = "shared_processor_pool" + Attr_SharedProcessorPoolID = "shared_processor_pool_id" + Attr_SharedProcessorPoolPlacementGroups = "spp_placement_groups" + Attr_SharedProcessorPoolStatus = "status" + Attr_SharedProcessorPools = "shared_processor_pools" + Attr_Size = "size" + Attr_SourceVolumeName = "source_volume_name" + Attr_Speed = "speed" + Attr_StartTime = "start_time" + Attr_State = "state" + Attr_Status = "status" + Attr_StatusDescriptionErrors = "status_description_errors" + Attr_StatusDetail = "status_detail" + Attr_StoragePool = "storage_pool" + Attr_StoragePoolAffinity = "storage_pool_affinity" + Attr_StoragePoolsCapacity = "storage_pools_capacity" + Attr_StorageType = "storage_type" + Attr_StorageTypesCapacity = "storage_types_capacity" + Attr_Synchronized = "synchronized" + Attr_SysType = "systype" + Attr_SystemPoolName = "system_pool_name" + Attr_SystemPools = "system_pools" + Attr_Systems = "systems" + Attr_TargetVolumeName = "target_volume_name" + Attr_TenantID = "tenant_id" + Attr_TenantName = "tenant_name" + Attr_TotalCapacity = "total_capacity" + Attr_TotalInstances = "total_instances" + Attr_TotalMemoryConsumed = "total_memory_consumed" + Attr_TotalProcessorsConsumed = "total_processors_consumed" + Attr_TotalSSDStorageConsumed = "total_ssd_storage_consumed" + Attr_TotalStandardStorageConsumed = "total_standard_storage_consumed" + Attr_Type = "type" + Attr_URL = "url" + Attr_Uncapped = "uncapped" + Attr_UsedIPCount = "used_ip_count" + Attr_UsedIPPercent = "used_ip_percent" + Attr_UserIPAddress = "user_ip_address" + Attr_VCPUs = "vcpus" + Attr_VLanID = "vlan_id" + Attr_VPCCRNs = "vpc_crns" + Attr_VPCEnabled = "vpc_enabled" + Attr_VirtualCoresAssigned = "virtual_cores_assigned" + Attr_VolumeGroupName = "volume_group_name" + Attr_VolumeGroups = "volume_groups" + Attr_VolumeIDs = "volume_ids" + Attr_VolumePool = "volume_pool" + Attr_VolumeSnapshots = "volume_snapshots" + Attr_Volumes = "volumes" + Attr_WWN = "wwn" + Attr_Workspaces = "workspaces" + Attr_SharedProcessorPoolName = "name" + Attr_SharedProcessorPoolHostID = "host_id" + Attr_SharedProcessorPoolReservedCores = "reserved_cores" + Attr_SharedProcessorPoolAvailableCores = "available_cores" + Attr_SharedProcessorPoolAllocatedCores = "allocated_cores" + Attr_SharedProcessorPoolStatusDetail = "status_detail" + Attr_SharedProcessorPoolInstances = "instances" + Attr_SharedProcessorPoolInstanceCpus = "cpus" + Attr_SharedProcessorPoolInstanceUncapped = "uncapped" + Attr_SharedProcessorPoolInstanceAvailabilityZone = "availability_zone" + Attr_SharedProcessorPoolInstanceId = "id" + Attr_SharedProcessorPoolInstanceMemory = "memory" + Attr_SharedProcessorPoolInstanceName = "name" + Attr_SharedProcessorPoolInstanceStatus = "status" + Attr_SharedProcessorPoolInstanceVcpus = "vcpus" + // TODO: Second Half Cleanup, remove extra variables // SAP Profile PISAPProfiles = "profiles" @@ -28,12 +259,13 @@ const ( PISAPProfileType = "type" // DHCP - Arg_DhcpCidr = "pi_cidr" - Arg_DhcpID = "pi_dhcp_id" - Arg_DhcpCloudConnectionID = "pi_cloud_connection_id" - Arg_DhcpDnsServer = "pi_dns_server" - Arg_DhcpName = "pi_dhcp_name" - Arg_DhcpSnatEnabled = "pi_dhcp_snat_enabled" + Arg_DhcpCidr = "pi_cidr" + Arg_DhcpID = "pi_dhcp_id" + Arg_DhcpCloudConnectionID = "pi_cloud_connection_id" + Arg_DhcpDnsServer = "pi_dns_server" + Arg_DhcpName = "pi_dhcp_name" + Arg_DhcpSnatEnabled = "pi_dhcp_snat_enabled" + Arg_PIInstanceSharedProcessorPool = "pi_shared_processor_pool" Attr_DhcpServers = "servers" Attr_DhcpID = "dhcp_id" @@ -50,10 +282,6 @@ const ( Arg_PVMInstanceActionType = "pi_action" Arg_PVMInstanceHealthStatus = "pi_health_status" - Attr_Status = "status" - Attr_Progress = "progress" - Attr_HealthStatus = "health_status" - PVMInstanceHealthOk = "OK" PVMInstanceHealthWarning = "WARNING" @@ -61,14 +289,24 @@ const ( warningTimeOut = 60 * time.Second activeTimeOut = 2 * time.Minute // power service instance capabilities - CUSTOM_VIRTUAL_CORES = "custom-virtualcores" - PIInstanceDeploymentType = "pi_deployment_type" - PIInstanceNetwork = "pi_network" - PIInstanceStoragePool = "pi_storage_pool" - PISAPInstanceProfileID = "pi_sap_profile_id" - PISAPInstanceDeploymentType = "pi_sap_deployment_type" - PIInstanceStoragePoolAffinity = "pi_storage_pool_affinity" - Arg_PIInstanceSharedProcessorPool = "pi_shared_processor_pool" + CUSTOM_VIRTUAL_CORES = "custom-virtualcores" + + //Arg_CloudInstanceID = "pi_cloud_instance_id" + PIInstanceDeploymentType = "pi_deployment_type" + PIInstanceMigratable = "pi_migratable" + PIInstanceNetwork = "pi_network" + PIInstanceLicenseRepositoryCapacity = "pi_license_repository_capacity" + PIInstanceStoragePool = "pi_storage_pool" + PIInstanceStorageType = "pi_storage_type" + PISAPInstanceProfileID = "pi_sap_profile_id" + PISAPInstanceDeploymentType = "pi_sap_deployment_type" + PIInstanceSharedProcessorPool = "pi_shared_processor_pool" + PIInstanceStorageConnection = "pi_storage_connection" + PIInstanceStoragePoolAffinity = "pi_storage_pool_affinity" + + PIInstanceUserData = "pi_user_data" + PIInstanceVolumeIds = "pi_volume_ids" + Attr_PIInstanceSharedProcessorPool = "shared_processor_pool" Attr_PIInstanceSharedProcessorPoolID = "shared_processor_pool_id" @@ -107,37 +345,10 @@ const ( // Cloud Connections PICloudConnectionTransitEnabled = "pi_cloud_connection_transit_enabled" - // Shared Processor Pool - Arg_SharedProcessorPoolName = "pi_shared_processor_pool_name" - Arg_SharedProcessorPoolHostGroup = "pi_shared_processor_pool_host_group" - Arg_SharedProcessorPoolPlacementGroupID = "pi_shared_processor_pool_placement_group_id" - Arg_SharedProcessorPoolReservedCores = "pi_shared_processor_pool_reserved_cores" - Arg_SharedProcessorPoolID = "pi_shared_processor_pool_id" - Attr_SharedProcessorPoolID = "shared_processor_pool_id" - Attr_SharedProcessorPoolName = "name" - Attr_SharedProcessorPoolReservedCores = "reserved_cores" - Attr_SharedProcessorPoolAvailableCores = "available_cores" - Attr_SharedProcessorPoolAllocatedCores = "allocated_cores" - Attr_SharedProcessorPoolHostID = "host_id" - Attr_SharedProcessorPoolStatus = "status" - Attr_SharedProcessorPoolStatusDetail = "status_detail" - Attr_SharedProcessorPoolPlacementGroups = "spp_placement_groups" - Attr_SharedProcessorPoolInstances = "instances" - Attr_SharedProcessorPoolInstanceCpus = "cpus" - Attr_SharedProcessorPoolInstanceUncapped = "uncapped" - Attr_SharedProcessorPoolInstanceAvailabilityZone = "availability_zone" - Attr_SharedProcessorPoolInstanceId = "id" - Attr_SharedProcessorPoolInstanceMemory = "memory" - Attr_SharedProcessorPoolInstanceName = "name" - Attr_SharedProcessorPoolInstanceStatus = "status" - Attr_SharedProcessorPoolInstanceVcpus = "vcpus" - // SPP Placement Group - Arg_SPPPlacementGroupName = "pi_spp_placement_group_name" - Arg_SPPPlacementGroupPolicy = "pi_spp_placement_group_policy" + Attr_SPPPlacementGroupID = "spp_placement_group_id" Attr_SPPPlacementGroupMembers = "members" - Arg_SPPPlacementGroupID = "pi_spp_placement_group_id" Attr_SPPPlacementGroupPolicy = "policy" Attr_SPPPlacementGroupName = "name" From 55c2d7e696f9e227583d7f2ae9204654c18fffc0 Mon Sep 17 00:00:00 2001 From: Diptipowervs Date: Mon, 19 Feb 2024 15:41:16 +0530 Subject: [PATCH 04/11] resolve conflicts --- go.sum | 2 -- 1 file changed, 2 deletions(-) diff --git a/go.sum b/go.sum index 6e087e9ce1..112804e740 100644 --- a/go.sum +++ b/go.sum @@ -158,8 +158,6 @@ github.com/IBM/mqcloud-go-sdk v0.0.4 h1:gqMpoU5a0qJ0GETG4PQrkgeEEoaQLvbxRJnEe6yt github.com/IBM/mqcloud-go-sdk v0.0.4/go.mod h1:gQptHC6D+rxfg0muRFFGvTDmvl4YfiDE0uXkaRRewRk= github.com/IBM/networking-go-sdk v0.44.0 h1:6acyMd6hwxcjK3bJ2suiUBTjzg8mRFAvYD76zbx0adk= github.com/IBM/networking-go-sdk v0.44.0/go.mod h1:XtqYRInR5NHmFUXhOL6RovpDdv6PnJfZ1lPFvssA8MA= -github.com/IBM/platform-services-go-sdk v0.55.0 h1:W598xZanL61bwd8O2DQexr4qjIr+/tP0Y845zoms5yA= -github.com/IBM/platform-services-go-sdk v0.55.0/go.mod h1:CWSprvsCsXWvujmBzbtoJSmbRZS9FVV3O594b0t/GiM= github.com/IBM/platform-services-go-sdk v0.56.3 h1:DQ1VMQSknhPsdT7d+AybKiZT82esczAkHCIBkwYubzQ= github.com/IBM/platform-services-go-sdk v0.56.3/go.mod h1:+U6Kg7o5u/Bh4ZkLxjymSgfdpVsaWAtsMtzhwclUry0= github.com/IBM/project-go-sdk v0.2.0 h1:DMv0HQfS3GQHkkagZ4E2vt1H1paN5Gh357K9izeaGj8= From 2a0e6c3be230d7ab7aabb1a5df21131054689f1b Mon Sep 17 00:00:00 2001 From: Diptipowervs Date: Mon, 19 Feb 2024 16:01:40 +0530 Subject: [PATCH 05/11] Add pi constants --- ibm/service/power/ibm_pi_constants.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ibm/service/power/ibm_pi_constants.go b/ibm/service/power/ibm_pi_constants.go index db553ec77d..afeea41147 100644 --- a/ibm/service/power/ibm_pi_constants.go +++ b/ibm/service/power/ibm_pi_constants.go @@ -278,9 +278,10 @@ const ( Attr_DhcpStatus = "status" // Instance - Arg_PVMInstanceId = "pi_instance_id" - Arg_PVMInstanceActionType = "pi_action" - Arg_PVMInstanceHealthStatus = "pi_health_status" + Arg_PVMInstanceId = "pi_instance_id" + Arg_PVMInstanceActionType = "pi_action" + Arg_PVMInstanceHealthStatus = "pi_health_status" + Arg_PIInstanceSharedProcessorPool = "pi_shared_processor_pool" PVMInstanceHealthOk = "OK" PVMInstanceHealthWarning = "WARNING" @@ -315,7 +316,6 @@ const ( Attr_PIInstanceSharedProcessorPool = "shared_processor_pool" Attr_PIInstanceSharedProcessorPoolID = "shared_processor_pool_id" - Arg_PIInstanceSharedProcessorPool = "pi_shared_processor_pool" // Placement Group PIPlacementGroupID = "placement_group_id" @@ -401,4 +401,6 @@ const ( PIWorkspaceDatacenter = "pi_datacenter" PIWorkspaceResourceGroup = "pi_resource_group_id" PIWorkspacePlan = "pi_plan" + + PIVirtualOpticalDevice = "pi_virtual_optical_device" ) From 47a9724f13b88700373be08b9e6b4c5a2b0735be Mon Sep 17 00:00:00 2001 From: Diptipowervs Date: Mon, 19 Feb 2024 18:14:34 +0530 Subject: [PATCH 06/11] conflicts --- ibm/service/power/ibm_pi_constants.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ibm/service/power/ibm_pi_constants.go b/ibm/service/power/ibm_pi_constants.go index db553ec77d..d6084331eb 100644 --- a/ibm/service/power/ibm_pi_constants.go +++ b/ibm/service/power/ibm_pi_constants.go @@ -291,6 +291,7 @@ const ( // power service instance capabilities CUSTOM_VIRTUAL_CORES = "custom-virtualcores" + PIConsoleLanguageCode = "pi_language_code" PICloudConnectionId = "cloud_connection_id" PICloudConnectionStatus = "status" PICloudConnectionIBMIPAddress = "ibm_ip_address" @@ -401,4 +402,5 @@ const ( PIWorkspaceDatacenter = "pi_datacenter" PIWorkspaceResourceGroup = "pi_resource_group_id" PIWorkspacePlan = "pi_plan" + PIVirtualOpticalDevice = "pi_virtual_optical_device" ) From 878ed989d3a7bea96435d0ac2de442922ba2fae2 Mon Sep 17 00:00:00 2001 From: Diptipowervs Date: Wed, 21 Feb 2024 17:44:50 +0530 Subject: [PATCH 07/11] Resolve conflicts --- ibm/service/power/ibm_pi_constants.go | 1 - website/docs/d/pi_dhcp.html.markdown | 27 --------------------------- 2 files changed, 28 deletions(-) diff --git a/ibm/service/power/ibm_pi_constants.go b/ibm/service/power/ibm_pi_constants.go index ae3ffc8d16..c56a91e558 100644 --- a/ibm/service/power/ibm_pi_constants.go +++ b/ibm/service/power/ibm_pi_constants.go @@ -276,7 +276,6 @@ const ( Attr_DhcpNetworkDeprecated = "network" // to deprecate Attr_DhcpNetworkID = "network_id" Attr_DhcpNetworkName = "network_name" - Attr_DhcpStatus = "status" // Instance Arg_PVMInstanceId = "pi_instance_id" diff --git a/website/docs/d/pi_dhcp.html.markdown b/website/docs/d/pi_dhcp.html.markdown index 02f412d3a9..89c3534cd0 100644 --- a/website/docs/d/pi_dhcp.html.markdown +++ b/website/docs/d/pi_dhcp.html.markdown @@ -17,38 +17,11 @@ data "ibm_pi_dhcp" "example" { } ``` -<<<<<<< HEAD **Notes** - Please find [supported Regions](https://cloud.ibm.com/apidocs/power-cloud#endpoint) for endpoints. - If a Power cloud instance is provisioned at `lon04`, The provider level attributes should be as follows: - `region` - `lon` - `zone` - `lon04` -======= -## Argument reference -Review the argument references that you can specify for your data source. - -- `pi_cloud_instance_id` - (Required, String) Cloud Instance ID of a PCloud Instance. -- `pi_dhcp_id` - (Required, String) The ID of the DHCP Server. - -## Attribute reference -In addition to all argument reference list, you can access the following attribute references after your data source is created. - -- `id` - (String) The ID of the DHCP Server. -- `leases` - (List) The list of DHCP Server PVM Instance leases. - Nested scheme for `leases`: - - `instance_ip` - (String) The IP of the PVM Instance. - - `instance_mac` - (String) The MAC Address of the PVM Instance. -- `network_id`- (String) The ID of the DHCP Server private network. -- `network_name` - The name of the DHCP Server private network. -- `status` - (String) The status of the DHCP Server. - -**Note** - -* Please find [supported Regions](https://cloud.ibm.com/apidocs/power-cloud#endpoint) for endpoints. -* If a Power cloud instance is provisioned at `lon04`, The provider level attributes should be as follows: - * `region` - `lon` - * `zone` - `lon04` ->>>>>>> master Example usage: ```terraform From bacc2fd250f795f4ac0b7d8c5ef5d18ec3430496 Mon Sep 17 00:00:00 2001 From: Diptipowervs Date: Wed, 21 Feb 2024 17:58:55 +0530 Subject: [PATCH 08/11] bug fix --- ibm/service/power/ibm_pi_constants.go | 1 + 1 file changed, 1 insertion(+) diff --git a/ibm/service/power/ibm_pi_constants.go b/ibm/service/power/ibm_pi_constants.go index c56a91e558..ae3ffc8d16 100644 --- a/ibm/service/power/ibm_pi_constants.go +++ b/ibm/service/power/ibm_pi_constants.go @@ -276,6 +276,7 @@ const ( Attr_DhcpNetworkDeprecated = "network" // to deprecate Attr_DhcpNetworkID = "network_id" Attr_DhcpNetworkName = "network_name" + Attr_DhcpStatus = "status" // Instance Arg_PVMInstanceId = "pi_instance_id" From 8108f13e070914ff48dcb3a8666b6f38a6172d3e Mon Sep 17 00:00:00 2001 From: Diptipowervs Date: Thu, 22 Feb 2024 00:00:57 +0530 Subject: [PATCH 09/11] Deprecate Attr_DhcpID --- ibm/service/power/data_source_ibm_pi_dhcp.go | 1 + ibm/service/power/data_source_ibm_pi_dhcps.go | 1 + website/docs/d/pi_dhcp.html.markdown | 2 +- website/docs/d/pi_dhcps.html.markdown | 23 +------------------ 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/ibm/service/power/data_source_ibm_pi_dhcp.go b/ibm/service/power/data_source_ibm_pi_dhcp.go index 9e1d2f5966..36802e54cd 100644 --- a/ibm/service/power/data_source_ibm_pi_dhcp.go +++ b/ibm/service/power/data_source_ibm_pi_dhcp.go @@ -35,6 +35,7 @@ func DataSourceIBMPIDhcp() *schema.Resource { // Attributes Attr_DhcpID: { Computed: true, + Deprecated: "The field is deprecated,use mtu instead.", Description: "ID of the DHCP Server.", Type: schema.TypeString, }, diff --git a/ibm/service/power/data_source_ibm_pi_dhcps.go b/ibm/service/power/data_source_ibm_pi_dhcps.go index 5291e9b9bd..b4ea1529e2 100644 --- a/ibm/service/power/data_source_ibm_pi_dhcps.go +++ b/ibm/service/power/data_source_ibm_pi_dhcps.go @@ -36,6 +36,7 @@ func DataSourceIBMPIDhcps() *schema.Resource { Schema: map[string]*schema.Schema{ Attr_DhcpID: { Computed: true, + Deprecated: "The field is deprecated,use mtu instead.", Description: "ID of the DHCP Server.", Type: schema.TypeString, }, diff --git a/website/docs/d/pi_dhcp.html.markdown b/website/docs/d/pi_dhcp.html.markdown index 89c3534cd0..5bb3c6182b 100644 --- a/website/docs/d/pi_dhcp.html.markdown +++ b/website/docs/d/pi_dhcp.html.markdown @@ -40,7 +40,7 @@ Review the argument references that you can specify for your data source. ## Attribute reference In addition to all argument reference list, you can access the following attribute references after your data source is created. -- `dhcp_id` - (String) ID of the DHCP Server. +- `dhcp_id` - (Deprecated,String) ID of the DHCP Server. - `leases` - (List) List of DHCP Server PVM Instance leases. Nested scheme for `leases`: - `instance_ip` - (String) IP of the PVM Instance. diff --git a/website/docs/d/pi_dhcps.html.markdown b/website/docs/d/pi_dhcps.html.markdown index cc07821646..f197417357 100644 --- a/website/docs/d/pi_dhcps.html.markdown +++ b/website/docs/d/pi_dhcps.html.markdown @@ -16,27 +16,6 @@ data "ibm_pi_dhcps" "example" { } ``` -<<<<<<< HEAD -======= -## Argument reference - -Review the argument references that you can specify for your data source. - -- `pi_cloud_instance_id` - (Required, String) Cloud Instance ID of a PCloud Instance. - -## Attribute reference - -In addition to all argument reference list, you can access the following attribute references after your data source is created. - -- `servers` - (List) The list of all the DHCP Servers. - - Nested scheme for `servers`: - - `dhcp_id` - (String) The ID of the DHCP Server. - - `network_id`- (String) The ID of the DHCP Server private network. - - `network_name` - The name of the DHCP Server private network. - - `status` - (String) The status of the DHCP Server. - ->>>>>>> master **Notes** - Please find [supported Regions](https://cloud.ibm.com/apidocs/power-cloud#endpoint) for endpoints. - If a Power cloud instance is provisioned at `lon04`, The provider level attributes should be as follows: @@ -62,7 +41,7 @@ In addition to all argument reference list, you can access the following attribu - `servers` - (List) List of all the DHCP Servers. Nested scheme for `servers`: - - `dhcp_id` - (String) ID of the DHCP Server. + - `dhcp_id` - (Deprecated,String) ID of the DHCP Server. - `network` - (String) ID of the DHCP Server private network (deprecated - replaced by `network_id`). - `network_id`- (String) ID of the DHCP Server private network. - `network_name` - (String) Name of the DHCP Server private network. From 7d1a0b14c9cc6bc3502fa077cd61f404d2b885b3 Mon Sep 17 00:00:00 2001 From: Axel Ismirlian Date: Fri, 23 Feb 2024 11:07:52 -0600 Subject: [PATCH 10/11] Update deprecated field description --- ibm/service/power/data_source_ibm_pi_dhcp.go | 4 ++-- ibm/service/power/data_source_ibm_pi_dhcps.go | 4 ++-- website/docs/d/pi_dhcp.html.markdown | 3 ++- website/docs/d/pi_dhcps.html.markdown | 3 ++- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/ibm/service/power/data_source_ibm_pi_dhcp.go b/ibm/service/power/data_source_ibm_pi_dhcp.go index 36802e54cd..5768c242f5 100644 --- a/ibm/service/power/data_source_ibm_pi_dhcp.go +++ b/ibm/service/power/data_source_ibm_pi_dhcp.go @@ -35,7 +35,7 @@ func DataSourceIBMPIDhcp() *schema.Resource { // Attributes Attr_DhcpID: { Computed: true, - Deprecated: "The field is deprecated,use mtu instead.", + Deprecated: "The field is deprecated, use id instead.", Description: "ID of the DHCP Server.", Type: schema.TypeString, }, @@ -59,9 +59,9 @@ func DataSourceIBMPIDhcp() *schema.Resource { Type: schema.TypeList, }, Attr_DhcpNetworkID: { - Type: schema.TypeString, Computed: true, Description: "ID of the DHCP Server private network.", + Type: schema.TypeString, }, Attr_NetworkName: { Computed: true, diff --git a/ibm/service/power/data_source_ibm_pi_dhcps.go b/ibm/service/power/data_source_ibm_pi_dhcps.go index b4ea1529e2..c1c80252b6 100644 --- a/ibm/service/power/data_source_ibm_pi_dhcps.go +++ b/ibm/service/power/data_source_ibm_pi_dhcps.go @@ -36,14 +36,14 @@ func DataSourceIBMPIDhcps() *schema.Resource { Schema: map[string]*schema.Schema{ Attr_DhcpID: { Computed: true, - Deprecated: "The field is deprecated,use mtu instead.", + Deprecated: "The field is deprecated, use id instead.", Description: "ID of the DHCP Server.", Type: schema.TypeString, }, Attr_DhcpNetworkID: { - Type: schema.TypeString, Computed: true, Description: "ID of the DHCP Server private network.", + Type: schema.TypeString, }, Attr_NetworkName: { Computed: true, diff --git a/website/docs/d/pi_dhcp.html.markdown b/website/docs/d/pi_dhcp.html.markdown index 5bb3c6182b..3207d14929 100644 --- a/website/docs/d/pi_dhcp.html.markdown +++ b/website/docs/d/pi_dhcp.html.markdown @@ -40,7 +40,8 @@ Review the argument references that you can specify for your data source. ## Attribute reference In addition to all argument reference list, you can access the following attribute references after your data source is created. -- `dhcp_id` - (Deprecated,String) ID of the DHCP Server. +- `dhcp_id` - (Deprecated, String) ID of the DHCP Server. +- `id` - (String) ID of the DHCP Server. - `leases` - (List) List of DHCP Server PVM Instance leases. Nested scheme for `leases`: - `instance_ip` - (String) IP of the PVM Instance. diff --git a/website/docs/d/pi_dhcps.html.markdown b/website/docs/d/pi_dhcps.html.markdown index f197417357..30e2be6d9f 100644 --- a/website/docs/d/pi_dhcps.html.markdown +++ b/website/docs/d/pi_dhcps.html.markdown @@ -41,7 +41,8 @@ In addition to all argument reference list, you can access the following attribu - `servers` - (List) List of all the DHCP Servers. Nested scheme for `servers`: - - `dhcp_id` - (Deprecated,String) ID of the DHCP Server. + - `dhcp_id` - (Deprecated, String) ID of the DHCP Server. + - `id` - (String) ID of the DHCP Server. - `network` - (String) ID of the DHCP Server private network (deprecated - replaced by `network_id`). - `network_id`- (String) ID of the DHCP Server private network. - `network_name` - (String) Name of the DHCP Server private network. From f35414dd3fe5d31ad54a40a4ad205aad9f07f540 Mon Sep 17 00:00:00 2001 From: Axel Ismirlian Date: Fri, 1 Mar 2024 12:12:47 -0600 Subject: [PATCH 11/11] Fix deprecated code --- ibm/service/power/data_source_ibm_pi_dhcp.go | 2 +- ibm/service/power/data_source_ibm_pi_dhcps.go | 1 - website/docs/d/pi_dhcp.html.markdown | 1 - website/docs/d/pi_dhcps.html.markdown | 3 +-- 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ibm/service/power/data_source_ibm_pi_dhcp.go b/ibm/service/power/data_source_ibm_pi_dhcp.go index 5768c242f5..621a7e3d49 100644 --- a/ibm/service/power/data_source_ibm_pi_dhcp.go +++ b/ibm/service/power/data_source_ibm_pi_dhcp.go @@ -35,7 +35,7 @@ func DataSourceIBMPIDhcp() *schema.Resource { // Attributes Attr_DhcpID: { Computed: true, - Deprecated: "The field is deprecated, use id instead.", + Deprecated: "The field is deprecated, use pi_dhcp_id instead.", Description: "ID of the DHCP Server.", Type: schema.TypeString, }, diff --git a/ibm/service/power/data_source_ibm_pi_dhcps.go b/ibm/service/power/data_source_ibm_pi_dhcps.go index c1c80252b6..02344815c1 100644 --- a/ibm/service/power/data_source_ibm_pi_dhcps.go +++ b/ibm/service/power/data_source_ibm_pi_dhcps.go @@ -36,7 +36,6 @@ func DataSourceIBMPIDhcps() *schema.Resource { Schema: map[string]*schema.Schema{ Attr_DhcpID: { Computed: true, - Deprecated: "The field is deprecated, use id instead.", Description: "ID of the DHCP Server.", Type: schema.TypeString, }, diff --git a/website/docs/d/pi_dhcp.html.markdown b/website/docs/d/pi_dhcp.html.markdown index 3207d14929..6cc6f13a5d 100644 --- a/website/docs/d/pi_dhcp.html.markdown +++ b/website/docs/d/pi_dhcp.html.markdown @@ -41,7 +41,6 @@ Review the argument references that you can specify for your data source. In addition to all argument reference list, you can access the following attribute references after your data source is created. - `dhcp_id` - (Deprecated, String) ID of the DHCP Server. -- `id` - (String) ID of the DHCP Server. - `leases` - (List) List of DHCP Server PVM Instance leases. Nested scheme for `leases`: - `instance_ip` - (String) IP of the PVM Instance. diff --git a/website/docs/d/pi_dhcps.html.markdown b/website/docs/d/pi_dhcps.html.markdown index 30e2be6d9f..eeb180a553 100644 --- a/website/docs/d/pi_dhcps.html.markdown +++ b/website/docs/d/pi_dhcps.html.markdown @@ -41,8 +41,7 @@ In addition to all argument reference list, you can access the following attribu - `servers` - (List) List of all the DHCP Servers. Nested scheme for `servers`: - - `dhcp_id` - (Deprecated, String) ID of the DHCP Server. - - `id` - (String) ID of the DHCP Server. + - `dhcp_id` - (String) ID of the DHCP Server. - `network` - (String) ID of the DHCP Server private network (deprecated - replaced by `network_id`). - `network_id`- (String) ID of the DHCP Server private network. - `network_name` - (String) Name of the DHCP Server private network.