TritonDataCenter / TritonDataCenter/node-triton

`-o field,field,...` should be strict about allowed fields

Open
#89 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
60
Forks
36
Avg merge
3d 8h
Merged PRs (30d)
1

Description

Currently it just silently fails, e.g.:

$ triton insts -o name,primaryip,package
NAME                                        PRIMARYIP  PACKAGE
nagios01                                    -          t4-standard-2G
rsyslog                                     -          t4-standard-2G
elk_logstash_1                              -          t4-standard-1G

because it is primaryIp, not primaryip.

Compare to:

[root@headnode (nightly-1) ~]# zfs list -o name,used,foobar
bad property list: invalid property 'foobar'
usage:
        list [-Hp] [-r|-d max] [-o property[,...]] [-s property]...
            [-S property]... [-t type[,...]] [filesystem|volume|snapshot] ...

The following properties are supported:

        PROPERTY       EDIT  INHERIT   VALUES

        available        NO       NO   <size>
...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the triton insts -o option handling and the field-name lookup used for instance output. Reproduce the primaryip and foobar examples, then identify how invalid fields are currently handled. Done means unsupported or incorrectly cased fields produce a clear validation error instead of silently rendering missing values.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.