connpy/conn/__init__.py

68 lines
1.8 KiB
Python
Raw Normal View History

2022-03-19 20:41:35 -03:00
#!/usr/bin/env python3
2022-04-02 23:25:53 -03:00
'''
2022-04-03 12:00:35 -03:00
## Connection manager
```
usage: conn [-h] [--add | --del | --mod | --show | --debug] [node|folder]
conn {profile,move,mv,copy,cp,list,ls,bulk,config} ...
positional arguments:
node|folder node[@subfolder][@folder]
Connect to specific node or show all matching nodes
[@subfolder][@folder]
Show all available connections globaly or in specified path
Options:
-h, --help show this help message and exit
--add Add new node[@subfolder][@folder] or [@subfolder]@folder
--del, --rm Delete node[@subfolder][@folder] or [@subfolder]@folder
--mod, --edit Modify node[@subfolder][@folder]
--show Show node[@subfolder][@folder]
--debug, -d Display all conections steps
Commands:
profile Manage profiles
move (mv) Move node
copy (cp) Copy node
list (ls) List profiles, nodes or folders
bulk Add nodes in bulk
config Manage app config
```
#### Manage profiles
```
usage: conn profile [-h] (--add | --del | --mod | --show) profile
positional arguments:
profile Name of profile to manage
options:
-h, --help show this help message and exit
--add Add new profile
--del, --rm Delete profile
--mod, --edit Modify profile
--show Show profile
```
#### Examples
```
conn profile --add office-user
conn --add @office
conn --add @datacenter@office
conn --add server@datacenter@office
conn --add pc@office
conn --show server@datacenter@office
conn pc@office
conn server
```
2022-04-02 23:25:53 -03:00
'''
2022-03-30 19:51:54 -03:00
from .core import node,nodes
2022-03-22 19:54:05 -03:00
from .configfile import configfile
2022-04-01 17:53:51 -03:00
from pkg_resources import get_distribution
2022-03-17 19:05:23 -03:00
2022-04-02 23:25:53 -03:00
__all__ = ["node", "nodes", "configfile"]
__version__ = "2.0.10"
2022-04-01 17:53:51 -03:00
__author__ = "Federico Luzzi"
2022-04-02 23:25:53 -03:00
__pdoc__ = {
'core': False,
'connapp': False,
}