project-koku / nise

A tool for generating sample cost usage data for testing purposes
GNU Affero General Public License v3.0
9 stars 15 forks source link

Update OCP manifest to match latest version of operator #366

Closed abaiken closed 3 years ago

abaiken commented 3 years ago

Testing

  1. Pull this branch and build the client:
    python setup.py install
  2. Run this command pointing at a directory that exists:
    nise report ocp  --ocp-cluster-id my-ocp-cluster --static-report-file examples/ocp_on_aws/ocp_static_data.yml --insights-upload test2
  3. View the manifest that is generated:
    (nise) ashleybrookeaiken@aaiken-mac nise % cat test2/my-ocp-cluster/20190701-20190801/manifest.json 
    {
    "uuid": "bbf2e24e-2e0e-4a63-8077-1659f9d6320a",
    "cluster_id": "my-ocp-cluster",
    "version": "2.4.10",
    "date": "2019-07-01 00:00:00",
    "files": ["bbf2e24e-2e0e-4a63-8077-1659f9d6320a_openshift_report.0.csv", "bbf2e24e-2e0e-4a63-8077-1659f9d6320a_openshift_report.1.csv", "bbf2e24e-2e0e-4a63-8077-1659f9d6320a_openshift_report.2.csv", "bbf2e24e-2e0e-4a63-8077-1659f9d6320a_openshift_report.3.csv"],
    "start": "2019-07-01 00:00:00",
    "end": "2019-07-31 00:00:00",
    "certified": "False",
    "cr_status": "{'clusterID': '4e009161-4f40-42c8-877c-3e59f6baea3d', 'clusterVersion': 'stable-4.6', 'api_url': 'https://cloud.redhat.com', 'authentication': {'type': 'token'}, 'packaging': {'max_reports_to_store': 30, 'max_size_MB': 100}, 'upload': {'ingress_path': '/api/ingress/v1/upload', 'upload': True, 'upload_wait': 27, 'upload_cycle': 360}, 'operator_commit': '2.4.10', 'prometheus': {'prometheus_configured': True, 'prometheus_connected': True, 'last_query_start_time': '2021-07-28T12:22:37Z', 'last_query_success_time': '2021-07-28T12:22:37Z', 'service_address': 'https://thanos-querier.openshift-monitoring.svc:9091'}, 'reports': {'report_month': '07', 'last_hour_queried': '2021-07-28 11:00:00 - 2021-07-28 11:59:59', 'data_collected': True}, 'source': {'sources_path': '/api/sources/v1.0/', 'name': 'INSERT-SOURCE-NAME', 'create_source': False, 'check_cycle': 1440}}"
    }
codecov[bot] commented 3 years ago

Codecov Report

Merging #366 (fcf5dfb) into master (443674a) will increase coverage by 0.0%. The diff coverage is 100.0%.

@@          Coverage Diff           @@
##           master    #366   +/-   ##
======================================
  Coverage    93.6%   93.6%           
======================================
  Files          48      48           
  Lines        3614    3615    +1     
  Branches      503     503           
======================================
+ Hits         3384    3385    +1     
  Misses        127     127           
  Partials      103     103           
dccurtis commented 3 years ago

@lcouzens can you think of any reason to make the CR status or certified flag configurable? The only real impact on the application side would be for logging and Koku-daily reporting. Maybe this is something we come back and add if we need it?