Skip to content

Commit

Permalink
Revert "fix product family value to match db (#194)" (#196)
Browse files Browse the repository at this point in the history
This reverts commit bc7c4a1.
  • Loading branch information
hiltol authored Sep 19, 2024
1 parent bc7c4a1 commit 3d38386
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions internal/resources/ibm/pi_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (r *PiInstance) piInstanceAIXOperatingSystemCostComponent() *schema.CostCom
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("ibm"),
Region: strPtr(r.Region),
ProductFamily: strPtr("composite"),
ProductFamily: strPtr("service"),
Service: strPtr("power-iaas"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "planName", Value: strPtr("power-virtual-server-group")},
Expand Down Expand Up @@ -165,7 +165,7 @@ func (r *PiInstance) piInstanceIBMiLPPPOperatingSystemCostComponent() *schema.Co
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("ibm"),
Region: strPtr(r.Region),
ProductFamily: strPtr("composite"),
ProductFamily: strPtr("service"),
Service: strPtr("power-iaas"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "planName", Value: strPtr("power-virtual-server-group")},
Expand Down Expand Up @@ -202,7 +202,7 @@ func (r *PiInstance) piInstanceIBMiOSOperatingSystemCostComponent() *schema.Cost
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("ibm"),
Region: strPtr(r.Region),
ProductFamily: strPtr("composite"),
ProductFamily: strPtr("service"),
Service: strPtr("power-iaas"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "planName", Value: strPtr("power-virtual-server-group")},
Expand Down Expand Up @@ -237,7 +237,7 @@ func (r *PiInstance) piInstanceIBMiOperatingSystemServiceExtensionCostComponent(
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("ibm"),
Region: strPtr(r.Region),
ProductFamily: strPtr("composite"),
ProductFamily: strPtr("service"),
Service: strPtr("power-iaas"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "planName", Value: strPtr("power-virtual-server-group")},
Expand Down Expand Up @@ -279,7 +279,7 @@ func (r *PiInstance) piInstanceMemoryHanaProfileCostComponent() *schema.CostComp
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("ibm"),
Region: strPtr(r.Region),
ProductFamily: strPtr("composite"),
ProductFamily: strPtr("service"),
Service: strPtr("power-iaas"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "planName", Value: strPtr("power-virtual-server-group")},
Expand Down Expand Up @@ -321,7 +321,7 @@ func (r *PiInstance) piInstanceCoresHanaProfileCostComponent() *schema.CostCompo
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("ibm"),
Region: strPtr(r.Region),
ProductFamily: strPtr("composite"),
ProductFamily: strPtr("service"),
Service: strPtr("power-iaas"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "planName", Value: strPtr("power-virtual-server-group")},
Expand Down Expand Up @@ -357,7 +357,7 @@ func (r *PiInstance) piInstanceCloudStorageSolutionCostComponent() *schema.CostC
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("ibm"),
Region: strPtr(r.Region),
ProductFamily: strPtr("composite"),
ProductFamily: strPtr("service"),
Service: strPtr("power-iaas"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "planName", Value: strPtr("power-virtual-server-group")},
Expand Down Expand Up @@ -391,7 +391,7 @@ func (r *PiInstance) piInstanceHighAvailabilityCostComponent() *schema.CostCompo
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("ibm"),
Region: strPtr(r.Region),
ProductFamily: strPtr("composite"),
ProductFamily: strPtr("service"),
Service: strPtr("power-iaas"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "planName", Value: strPtr("power-virtual-server-group")},
Expand Down Expand Up @@ -424,7 +424,7 @@ func (r *PiInstance) piInstanceDB2WebQueryCostComponent() *schema.CostComponent
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("ibm"),
Region: strPtr(r.Region),
ProductFamily: strPtr("composite"),
ProductFamily: strPtr("service"),
Service: strPtr("power-iaas"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "planName", Value: strPtr("power-virtual-server-group")},
Expand Down Expand Up @@ -457,7 +457,7 @@ func (r *PiInstance) piInstanceRationalDevStudioLicensesCostComponent() *schema.
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("ibm"),
Region: strPtr(r.Region),
ProductFamily: strPtr("composite"),
ProductFamily: strPtr("service"),
Service: strPtr("power-iaas"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "planName", Value: strPtr("power-virtual-server-group")},
Expand Down Expand Up @@ -530,7 +530,7 @@ func (r *PiInstance) piInstanceCoresCostComponent() *schema.CostComponent {
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("ibm"),
Region: strPtr(r.Region),
ProductFamily: strPtr("composite"),
ProductFamily: strPtr("service"),
Service: strPtr("power-iaas"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "planName", Value: strPtr("power-virtual-server-group")},
Expand Down Expand Up @@ -565,7 +565,7 @@ func (r *PiInstance) piInstanceMemoryCostComponent() *schema.CostComponent {
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("ibm"),
Region: strPtr(r.Region),
ProductFamily: strPtr("composite"),
ProductFamily: strPtr("service"),
Service: strPtr("power-iaas"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "planName", Value: strPtr("power-virtual-server-group")},
Expand All @@ -592,11 +592,8 @@ func (r *PiInstance) piInstanceStorageCostComponent() *schema.CostComponent {
unit = "TIER_ONE_STORAGE_GIGABYTE_HOURS"
} else if r.StorageType == "tier3" {
unit = "TIER_THREE_STORAGE_GIGABYTE_HOURS"
} else if r.StorageType == "tier0" {
unit = "TIER_ZERO_STORAGE_GIGABYTE_HOURS"
} else if r.StorageType == "tier5k" {
unit = "FIXED_5K_OPS_GIGABYTE_HOURS"
}

return &schema.CostComponent{
Name: fmt.Sprintf("Storage - %s", r.StorageType),
Unit: "GB hours",
Expand All @@ -605,7 +602,7 @@ func (r *PiInstance) piInstanceStorageCostComponent() *schema.CostComponent {
ProductFilter: &schema.ProductFilter{
VendorName: strPtr("ibm"),
Region: strPtr(r.Region),
ProductFamily: strPtr("composite"),
ProductFamily: strPtr("service"),
Service: strPtr("power-iaas"),
AttributeFilters: []*schema.AttributeFilter{
{Key: "planName", Value: strPtr("power-virtual-server-group")},
Expand Down

0 comments on commit 3d38386

Please sign in to comment.