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

Update README with usage information #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,50 @@
# ycclient

A tool to fetch details of a specific module from YANG Catalog.

```
Usage of ycclient:
-base string
Base URL for YANG catalog
-config string
Configuration file
-contributors
Retrieve contributing entities to the YANG catalog
-get
Perform REST GET request to YANG catalog
-module string
Retrieve module metadata
-org string
Organization to retrieve
-revision string
Module revision date
-vendor string
Vendor to retrieve
-verbose
Enable verbose output
-version
Build information
```

The base url to YANG Catalog must be either passed with the `--base` argument, or specified in a toml config file like so:
```
[base]
url = "https://yangcatalog.org"
```

### Examples
Get a list of organizations that have contributed modules to YANG Catalog
```
ycclient --base https://yangcatalog.org --get --contributors
```
Fetch the details of the `Cisco-NX-OS-device@2022-08-18` YANG module
```
ycclient --base https://yangcatalog.org --get --module Cisco-NX-OS-device --revision 2022-08-18 --org cisco --vendor cisco
```

### Compatibility
ycclient fetches data from the following YANG Catalog endpoints:
- `api/contributors`
- `api/search/modules/<name>,<revision>,<organization>`

These endpoints are covered by tests on YANG Catalog's side and guaranteed to maintain compatibility.