Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[COST-5114] Add type ahead support for the new EC2 fields #5159

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

djnakabaale
Copy link
Contributor

@djnakabaale djnakabaale commented Jun 10, 2024

Jira Ticket

COST-5114

Description

This change add type ahead support for the new EC2 fields: resource_id, instance_name, operating_system.

Testing

  1. Checkout Branch

  2. Load test data

    make create-test-customer ; make load-test-customer-data test_source=aws
    
  3. On these endpoints (supported filters are seach and limit), check to see

    • the AWS EC2 compute instances, http://127.0.0.1:8000/api/cost-management/v1/resource-types/aws-ec2-compute-instances/?search=instance-name-

        {
            "meta": {
                "count": 3,
                "limit": 10,
                "offset": 0
            },
            "links": {
                "first": "/api/cost-management/v1/resource-types/aws-ec2-compute-instances/?limit=10&offset=0&search=instance-name-",
                "next": null,
                "previous": null,
                "last": "/api/cost-management/v1/resource-types/aws-ec2-compute-instances/?limit=10&offset=0&search=instance-name-"
            },
            "data": [
                {
                    "account_alias": "instance-name-5",
                    "value": "i-444444443"
                },
                {
                    "account_alias": "instance-name-1",
                    "value": "i-55555555"
                },
                {
                    "account_alias": "instance-name-2",
                    "value": "i-55555556"
                }
            ]
        }
      
    • the AWS EC2 compute operating systems, http://127.0.0.1:8000/api/cost-management/v1/resource-types/aws-ec2-compute-os/?limit=5

        {
            "meta": {
                "count": 9,
                "limit": 5,
                "offset": 0
            },
            "links": {
                "first": "/api/cost-management/v1/resource-types/aws-ec2-compute-os/?limit=5&offset=0",
                "next": "/api/cost-management/v1/resource-types/aws-ec2-compute-os/?limit=5&offset=5",
                "previous": null,
                "last": "/api/cost-management/v1/resource-types/aws-ec2-compute-os/?limit=5&offset=4"
            },
            "data": [
                {
                    "value": "Amazon Linux"
                },
                {
                    "value": "CentOS"
                },
                {
                    "value": "Debian"
                },
                {
                    "value": "Fedora"
                },
                {
                    "value": "FreeBSD"
                }
            ]
        }
      

Release Notes

  • proposed release note
* [COST-5114](https://issues.redhat.com/browse/COST-5114) Add type ahead support for the new EC2 fields

Copy link

codecov bot commented Jun 10, 2024

Codecov Report

Attention: Patch coverage is 97.53086% with 2 lines in your changes missing coverage. Please review.

Project coverage is 94.1%. Comparing base (e2f0934) to head (439867d).

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #5159   +/-   ##
=====================================
  Coverage   94.1%   94.1%           
=====================================
  Files        375     377    +2     
  Lines      31194   31275   +81     
  Branches    3727    3739   +12     
=====================================
+ Hits       29360   29441   +81     
+ Misses      1168    1165    -3     
- Partials     666     669    +3     

@djnakabaale djnakabaale added the smoke-tests pr_check will build the image and run minimal required smokes label Jun 10, 2024
@djnakabaale djnakabaale marked this pull request as ready for review June 10, 2024 16:32
@djnakabaale djnakabaale requested review from a team as code owners June 10, 2024 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
smoke-tests pr_check will build the image and run minimal required smokes smokes-required
Projects
None yet
1 participant