Skip to content

Add an extended view for objects to show all of their relations #141

@jathanism

Description

@jathanism

If for example you run nsot networks list -c 10.10.10.1/32 you just get the output for that network itself:

$ nsot networks list -c 10.10.10.1/32
+-------------------------------------------------------------------------------+
| ID   CIDR (Key)      Is IP?   IP Ver.   Parent          State      Attributes |
+-------------------------------------------------------------------------------+
| 5    10.10.10.1/32   True     4         10.10.10.0/24   assigned              |
+-------------------------------------------------------------------------------+```

This idea is what if we add some kind of flag for "extended" view, it would also include other relations, something like:

$ ./nsot networks list -c 10.10.10.1/32 --extended
Network
+-------------------------------------------------------------------------------+
| ID   CIDR (Key)      Is IP?   IP Ver.   Parent          State      Attributes |
+-------------------------------------------------------------------------------+
| 5    10.10.10.1/32   True     4         10.10.10.0/24   assigned              |
+-------------------------------------------------------------------------------+

Assignments
+---------------------------+
| ID   Hostname   Interface |
+---------------------------+
| 2    lax-rtr1   eth0      |
+---------------------------+

Parent
+-------------------------------------------------------------------------+
| ID   CIDR (Key)      Is IP?   IP Ver.   Parent   State       Attributes |
+-------------------------------------------------------------------------+
| 4    10.10.10.0/24   False    4         None     allocated              |
+-------------------------------------------------------------------------+

Eh? Something like this? Perhaps in a more easily consumable format that isn't just a bunch of tables being output?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions