https://github.com/oneops/oneops-client-config
A standard way for OneOps client applications to retrieve configuration for connecting to a OneOps instance.
https://github.com/oneops/oneops-client-config
Last synced: 5 months ago
JSON representation
A standard way for OneOps client applications to retrieve configuration for connecting to a OneOps instance.
- Host: GitHub
- URL: https://github.com/oneops/oneops-client-config
- Owner: oneops
- License: apache-2.0
- Created: 2017-06-17T14:30:03.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-23T00:17:08.000Z (over 8 years ago)
- Last Synced: 2024-03-26T15:00:12.122Z (about 2 years ago)
- Language: Shell
- Homepage:
- Size: 62.5 KB
- Stars: 0
- Watchers: 11
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# OneOps Client Config
The OneOps client config library is a standard way for OneOps client applications to retrieve configuration for connecting to a OneOps instance. The default configuration location is `~/.oneops/config`, but we also support the `~/.boo/config` location for Boo users. A simple INI format is used:
```
[default]
host = https://prod.oneops.walmart.com
organization = megatron
api_key = XXXXXX
email = oneops@walmart.com
cloud = magic-cloud-5
```
And to load the standard OneOps client configuration from `~/.oneops/config` with the `default` profile you can use the following example:
```java
import java.io.File;
import java.util.Map;
public class OneOpsClient {
// ...
public Map loadOneOpsConfig() throws Exception {
OneOpsConfigReader reader = new OneOpsConfigReader();
Map config = reader.readDefaultConfig();
return config;
}
}
```