Skip to content

Commit

Permalink
Added support for h100 cluster, instance and template changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ujjwal-ibm committed Nov 26, 2024
1 parent 4854242 commit f6bb392
Show file tree
Hide file tree
Showing 78 changed files with 16,092 additions and 110 deletions.
430 changes: 430 additions & 0 deletions examples/ibm-is-ng/main.tf

Large diffs are not rendered by default.

230 changes: 125 additions & 105 deletions ibm/acctest/acctest.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,111 +23,114 @@ const (
)

var (
AccountId string
AppIDTenantID string
AppIDTestUserEmail string
BackupPolicyJobID string
BackupPolicyID string
CfOrganization string
CfSpace string
CisDomainStatic string
CisDomainTest string
CisInstance string
CisResourceGroup string
CloudShellAccountID string
CosCRN string
BucketCRN string
ActivityTrackerInstanceCRN string
MetricsMonitoringCRN string
BucketName string
CosName string
Ibmid1 string
Ibmid2 string
IAMUser string
IAMAccountId string
IAMServiceId string
IAMTrustedProfileID string
Datacenter string
MachineType string
trustedMachineType string
PublicVlanID string
PrivateVlanID string
PrivateSubnetID string
PublicSubnetID string
SubnetID string
LbaasDatacenter string
LbaasSubnetId string
LbListerenerCertificateInstance string
IpsecDatacenter string
Customersubnetid string
Customerpeerip string
DedicatedHostName string
DedicatedHostID string
KubeVersion string
KubeUpdateVersion string
Zone string
ZonePrivateVlan string
ZonePublicVlan string
ZoneUpdatePrivateVlan string
ZoneUpdatePublicVlan string
WorkerPoolSecondaryStorage string
CsRegion string
ExtendedHardwareTesting bool
err error
placementGroupName string
CertCRN string
UpdatedCertCRN string
SecretCRN string
SecretCRN2 string
EnterpriseCRN string
InstanceCRN string
SecretGroupID string
RegionName string
ISZoneName string
ISZoneName2 string
ISZoneName3 string
IsResourceGroupID string
ISResourceCrn string
ISCIDR string
ISCIDR2 string
ISPublicSSHKeyFilePath string
ISPrivateSSHKeyFilePath string
ISAddressPrefixCIDR string
InstanceName string
InstanceProfileName string
InstanceProfileNameUpdate string
IsBareMetalServerProfileName string
IsBareMetalServerImage string
IsBareMetalServerImage2 string
DNSInstanceCRN string
DNSZoneID string
DNSInstanceCRN1 string
DNSZoneID1 string
DedicatedHostProfileName string
DedicatedHostGroupID string
InstanceDiskProfileName string
DedicatedHostGroupFamily string
DedicatedHostGroupClass string
ShareProfileName string
SourceShareCRN string
ShareEncryptionKey string
VNIId string
FloatingIpID string
VolumeProfileName string
VSIUnattachedBootVolumeID string
VSIDataVolumeID string
ISRouteDestination string
ISRouteNextHop string
ISSnapshotCRN string
WorkspaceID string
TemplateID string
ActionID string
JobID string
RepoURL string
RepoBranch string
imageName string
functionNamespace string
HpcsInstanceID string
AccountId string
AppIDTenantID string
AppIDTestUserEmail string
BackupPolicyJobID string
BackupPolicyID string
CfOrganization string
CfSpace string
CisDomainStatic string
CisDomainTest string
CisInstance string
CisResourceGroup string
CloudShellAccountID string
CosCRN string
BucketCRN string
ActivityTrackerInstanceCRN string
MetricsMonitoringCRN string
BucketName string
CosName string
Ibmid1 string
Ibmid2 string
IAMUser string
IAMAccountId string
IAMServiceId string
IAMTrustedProfileID string
Datacenter string
MachineType string
trustedMachineType string
PublicVlanID string
PrivateVlanID string
PrivateSubnetID string
PublicSubnetID string
SubnetID string
LbaasDatacenter string
LbaasSubnetId string
LbListerenerCertificateInstance string
IpsecDatacenter string
Customersubnetid string
Customerpeerip string
DedicatedHostName string
DedicatedHostID string
KubeVersion string
KubeUpdateVersion string
Zone string
ZonePrivateVlan string
ZonePublicVlan string
ZoneUpdatePrivateVlan string
ZoneUpdatePublicVlan string
WorkerPoolSecondaryStorage string
CsRegion string
ExtendedHardwareTesting bool
err error
placementGroupName string
CertCRN string
UpdatedCertCRN string
SecretCRN string
SecretCRN2 string
EnterpriseCRN string
InstanceCRN string
SecretGroupID string
RegionName string
ISZoneName string
ISZoneName2 string
ISZoneName3 string
IsResourceGroupID string
ISResourceCrn string
ISCIDR string
ISCIDR2 string
ISPublicSSHKeyFilePath string
ISPrivateSSHKeyFilePath string
ISAddressPrefixCIDR string
ISClusterNetworkProfileName string
ISInstanceGPUProfileName string
ISClusterNetworkSubnetPrefixesCidr string
InstanceName string
InstanceProfileName string
InstanceProfileNameUpdate string
IsBareMetalServerProfileName string
IsBareMetalServerImage string
IsBareMetalServerImage2 string
DNSInstanceCRN string
DNSZoneID string
DNSInstanceCRN1 string
DNSZoneID1 string
DedicatedHostProfileName string
DedicatedHostGroupID string
InstanceDiskProfileName string
DedicatedHostGroupFamily string
DedicatedHostGroupClass string
ShareProfileName string
SourceShareCRN string
ShareEncryptionKey string
VNIId string
FloatingIpID string
VolumeProfileName string
VSIUnattachedBootVolumeID string
VSIDataVolumeID string
ISRouteDestination string
ISRouteNextHop string
ISSnapshotCRN string
WorkspaceID string
TemplateID string
ActionID string
JobID string
RepoURL string
RepoBranch string
imageName string
functionNamespace string
HpcsInstanceID string
)

// MQ on Cloud
Expand Down Expand Up @@ -771,6 +774,23 @@ func init() {
fmt.Println("[INFO] Set the environment variable IS_ACCOUNT_ID for testing private_path_service_gateway_account_policy else it is set to default value 'fee82deba12e4c0fb69c3b09d1f12345'")
}

ISClusterNetworkProfileName = os.Getenv("IS_CLUSTER_NETWORK_PROFILE_NAME")
if ISClusterNetworkProfileName == "" {
ISClusterNetworkProfileName = "h100"
fmt.Println("[INFO] Set the environment variable IS_CLUSTER_NETWORK_PROFILE_NAME for testing cluster_network_profile else it is set to default value 'h100'")
}
ISInstanceGPUProfileName = os.Getenv("IS_INSTANCE_GPU_PROFILE_NAME")
if ISInstanceGPUProfileName == "" {
ISInstanceGPUProfileName = "gx3d-160x1792x8h100"
fmt.Println("[INFO] Set the environment variable IS_INSTANCE_GPU_PROFILE_NAME for testing cluster_network_attachments else it is set to default value 'gx3d-160x1792x8h100'")
}

ISClusterNetworkSubnetPrefixesCidr = os.Getenv("IS_CLUSTER_NETWORK_SUBNET_PREFIXES_CIDR")
if ISClusterNetworkSubnetPrefixesCidr == "" {
ISClusterNetworkSubnetPrefixesCidr = "10.1.0.0/24"
fmt.Println("[INFO] Set the environment variable IS_CLUSTER_NETWORK_SUBNET_PREFIXES_CIDR for testing cluster_network else it is set to default value '10.1.0.0/24'")
}

ISAddressPrefixCIDR = os.Getenv("SL_ADDRESS_PREFIX_CIDR")
if ISAddressPrefixCIDR == "" {
ISAddressPrefixCIDR = "10.120.0.0/24"
Expand Down
29 changes: 29 additions & 0 deletions ibm/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,20 @@ func Provider() *schema.Provider {
"ibm_is_bare_metal_server": vpc.DataSourceIBMIsBareMetalServer(),
"ibm_is_bare_metal_servers": vpc.DataSourceIBMIsBareMetalServers(),

// cluster
"ibm_is_cluster_network": vpc.DataSourceIBMIsClusterNetwork(),
"ibm_is_cluster_networks": vpc.DataSourceIBMIsClusterNetworks(),
"ibm_is_cluster_network_interface": vpc.DataSourceIBMIsClusterNetworkInterface(),
"ibm_is_cluster_network_interfaces": vpc.DataSourceIBMIsClusterNetworkInterfaces(),
"ibm_is_cluster_network_profile": vpc.DataSourceIBMIsClusterNetworkProfile(),
"ibm_is_cluster_network_profiles": vpc.DataSourceIBMIsClusterNetworkProfiles(),
"ibm_is_cluster_network_subnet": vpc.DataSourceIBMIsClusterNetworkSubnet(),
"ibm_is_cluster_network_subnets": vpc.DataSourceIBMIsClusterNetworkSubnets(),
"ibm_is_cluster_network_subnet_reserved_ip": vpc.DataSourceIBMIsClusterNetworkSubnetReservedIP(),
"ibm_is_cluster_network_subnet_reserved_ips": vpc.DataSourceIBMIsClusterNetworkSubnetReservedIps(),
"ibm_is_instance_cluster_network_attachment": vpc.DataSourceIBMIsInstanceClusterNetworkAttachment(),
"ibm_is_instance_cluster_network_attachments": vpc.DataSourceIBMIsInstanceClusterNetworkAttachments(),

"ibm_is_dedicated_host": vpc.DataSourceIbmIsDedicatedHost(),
"ibm_is_dedicated_hosts": vpc.DataSourceIbmIsDedicatedHosts(),
"ibm_is_dedicated_host_profile": vpc.DataSourceIbmIsDedicatedHostProfile(),
Expand Down Expand Up @@ -1174,6 +1188,13 @@ func Provider() *schema.Provider {
"ibm_is_backup_policy": vpc.ResourceIBMIsBackupPolicy(),
"ibm_is_backup_policy_plan": vpc.ResourceIBMIsBackupPolicyPlan(),

// cluster
"ibm_is_cluster_network_interface": vpc.ResourceIBMIsClusterNetworkInterface(),
"ibm_is_cluster_network_subnet_reserved_ip": vpc.ResourceIBMIsClusterNetworkSubnetReservedIP(),
"ibm_is_cluster_network_subnet": vpc.ResourceIBMIsClusterNetworkSubnet(),
"ibm_is_cluster_network": vpc.ResourceIBMIsClusterNetwork(),
"ibm_is_instance_cluster_network_attachment": vpc.ResourceIBMIsInstanceClusterNetworkAttachment(),

// bare_metal_server
"ibm_is_bare_metal_server_action": vpc.ResourceIBMIsBareMetalServerAction(),
"ibm_is_bare_metal_server_disk": vpc.ResourceIBMIsBareMetalServerDisk(),
Expand Down Expand Up @@ -1876,6 +1897,14 @@ func Validator() validate.ValidatorDict {
"ibm_is_bare_metal_server_network_interface": vpc.ResourceIBMIsBareMetalServerNetworkInterfaceValidator(),
"ibm_is_bare_metal_server": vpc.ResourceIBMIsBareMetalServerValidator(),

// cluster

"ibm_is_cluster_network_interface": vpc.ResourceIBMIsClusterNetworkInterfaceValidator(),
"ibm_is_cluster_network_subnet": vpc.ResourceIBMIsClusterNetworkSubnetValidator(),
"ibm_is_cluster_network_subnet_reserved_ip": vpc.ResourceIBMIsClusterNetworkSubnetReservedIPValidator(),
"ibm_is_cluster_network": vpc.ResourceIBMIsClusterNetworkValidator(),
"ibm_is_instance_cluster_network_attachment": vpc.ResourceIBMIsInstanceClusterNetworkAttachmentValidator(),

"ibm_is_dedicated_host_group": vpc.ResourceIbmIsDedicatedHostGroupValidator(),
"ibm_is_dedicated_host": vpc.ResourceIbmIsDedicatedHostValidator(),
"ibm_is_dedicated_host_disk_management": vpc.ResourceIBMISDedicatedHostDiskManagementValidator(),
Expand Down
Loading

0 comments on commit f6bb392

Please sign in to comment.