Comments (2)
it should be an error if 'name' is in the JSON file then
I.e. be strict
I don't want split brain there
from node-triton.
New example behaviour with stricter validation of these profile files:
[2015-09-10T00:25:36.989Z] WARN: triton/59744 on danger0.local: error loading profile; skipping (profilePath=/Users/trentm/.triton/profiles.d/ams1.json, err.code=Config)
ConfigError: error in "ams1" profile: /Users/trentm/.triton/profiles.d/ams1.json: file must not include "name" field
at ConfigError.TritonError (/Users/trentm/joy/node-triton/lib/errors.js:38:12)
at new ConfigError (/Users/trentm/joy/node-triton/lib/errors.js:73:17)
at _profileFromPath (/Users/trentm/joy/node-triton/lib/config.js:232:15)
at Object.loadAllProfiles (/Users/trentm/joy/node-triton/lib/config.js:268:27)
at CLI._listProfiles (/Users/trentm/joy/node-triton/lib/do_profiles.js:31:31)
at CLI.do_profiles (/Users/trentm/joy/node-triton/lib/do_profiles.js:155:5)
at CLI.dispatch (/Users/trentm/joy/node-triton/node_modules/cmdln/lib/cmdln.js:744:13)
at /Users/trentm/joy/node-triton/node_modules/cmdln/lib/cmdln.js:434:18
at CLI.init (/Users/trentm/joy/node-triton/node_modules/cmdln/lib/cmdln.js:555:5)
at CLI.init (/Users/trentm/joy/node-triton/lib/cli.js:227:26)
NAME CURR ACCOUNT URL
coal-trentm trentm https://10.88.88.3
east1 trent.mick https://us-east-1.api.joyent.com
...
or, e.g.:
$ triton profiles 2>&1 | bunyan
[2015-09-10T04:20:32.921Z] WARN: triton/60218 on danger0.local: error loading profile; skipping (profilePath=/Users/trentm/.triton/profiles.d/ams1.json, err.code=Config)
ConfigError: extraneous fields in "ams1" profile: /Users/trentm/.triton/profiles.d/ams1.json: foo
at ConfigError.TritonError (/Users/trentm/joy/node-triton/lib/errors.js:38:12)
at new ConfigError (/Users/trentm/joy/node-triton/lib/errors.js:73:17)
at _validateProfile (/Users/trentm/joy/node-triton/lib/config.js:85:15)
at _profileFromPath (/Users/trentm/joy/node-triton/lib/config.js:258:5)
at Object.loadAllProfiles (/Users/trentm/joy/node-triton/lib/config.js:288:27)
at CLI._listProfiles (/Users/trentm/joy/node-triton/lib/do_profiles.js:31:31)
at CLI.do_profiles (/Users/trentm/joy/node-triton/lib/do_profiles.js:155:5)
at CLI.dispatch (/Users/trentm/joy/node-triton/node_modules/cmdln/lib/cmdln.js:744:13)
at /Users/trentm/joy/node-triton/node_modules/cmdln/lib/cmdln.js:434:18
at CLI.init (/Users/trentm/joy/node-triton/node_modules/cmdln/lib/cmdln.js:555:5)
NAME CURR ACCOUNT URL
coal-trentm trentm https://10.88.88.3
east1 trent.mick https://us-east-1.api.joyent.com
...
from node-triton.
Related Issues (20)
- Support "triton network list fabric=true"
- config.js validateProfile is confused about how to be insecure HOT 2
- `triton rbac role[s]` should support new role API HOT 1
- Un-hide --act-as option and add environment var HOT 1
- v7.5.0 HOT 1
- triton inst migration finalize: error: not a valid migration action HOT 2
- Want Triton image update / tag HOT 1
- fs.unlink() requires a callback HOT 9
- node-triton fails to resolve host when a CNAME HOT 1
- triton volume list and triton volume sizes should agree on a unit HOT 1
- Honor the XDG directory conventions HOT 1
- `triton profile` should generate certs for cmon
- triton rbac commands generate os.tmpDir deprecation warning HOT 1
- Unhide volumes HOT 1
- Wrong CLI_CONFIG_DIR when XDG_CONFIG_HOME is set HOT 1
- want act-as support for "triton profile docker-setup" and "triton profile cmon-certgen" HOT 1
- cmon-certgen should generate an example prometheus.yml HOT 1
- want --primary argument to "triton inst nic create" HOT 1
- AssertionError in keyring.js caused by OpenSSL 3 HOT 4
- BadDigestError: Content-MD5 when body has non-ascii characters HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-triton.