Git Product home page Git Product logo

common-inventory's Introduction

Common Inventory

This repository explores designs for a common inventory system. The models and even behavior in it are currently wrong, but it provides a place to start and sketches ideas.

Run make build and then ./bin/common-inventory help.

Also try ./bin/comment-inventory serve help

Completion is available:

/bin/common-inventory completion --help

You can set options on the command line, with environment variables, or with a .common-inventory.yaml configuration file.

server:
  address: localhost:9080
storage:
  database: sqlite3
  sqlite3:
    dsn: inventory.db
  postgres:
    host: 'localhost'
    port: '5432'
    dbname: inventory

All command line options can be given in the config file.

storage.database selects the database configuration to use.

First run ./bin/common-inventory migrate Then run ./bin/common-inventory serve

In a separate terminal, run

curl -H "Authorization: Bearer 1234" -H "Content-Type: application/json" -d '{"DisplayName": "Example Cluster3", "ReporterType": "OCM", "ResourceType": "cluster", "LocalResourceId": "7", "Workspace": "csams", "Data": {"ApiServer": "www.example3.com/api-server"}}}' http://localhost:9080/api/inventory/v1alpha1/resources/clusters

Then run

curl -H "Authorization: Bearer 1234" 127.0.0.1:9080/api/inventory/v1alpha1/resources/clusters | jq .
curl -H "Authorization: Bearer 1234" 127.0.0.1:9080/api/inventory/v1alpha1/resources/clusters/1 | jq . 
curl -H "Authorization: Bearer 1234" 127.0.0.1:9080/api/inventory/v1alpha1/resources/clusters/hcrn:OCM:[email protected]:7 | jq .

common-inventory's People

Contributors

csams avatar

Watchers

 avatar  avatar

Forkers

akoserwal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.