| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
add functionality to add and remove a room
to add a new room use the command: ogcli add room --name <name>
--netmask <netmask> --center <center> --gateway <gateway> [--location
<location>] [--ntp <ntp>] [--dns <dns>] [--group <group>]
for instance, to create a room with name 'dummyroom', netmask
'255.255.255.0' and gateway 10.141.10.1 that is inside the center with
id 1, use:
$ ogcli add room --name dummyroom --netmask 255.255.255.0 --gateway
10.141.10.1 --center 1
Optionally, it is possible to provide additional information such as
location (--location <location>), ntp server (--ntp <ntp>), dns server
(--dns <dns>), and a group to contain the room (--group <group>).
to delete a room use: ogcli delete room --id <id>
for instance, to delete room with id 4 use:
$ ogcli delete room --id 4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use autopep8 for coding format, and only for whitespace changes. This
change drops use of tabs in favor of spaces.
Doesn't use autopep8 --aggresive option.
Format command:
$ autopep8 --inline --recursive .
When using git-blame, use --ignore-rev in order to ignore this
reformatting commit.
|
|
|
|
|
|
|
|
|
| |
Adds a pretty printing function for JSON data.
Replaces print for print_json in corresponding cli objects.
Follows commit 828d6c0ce7d4a6b4bcd95e97155460fd59856bdd
("list scopes: pretty print scope tree")
|
|
|
|
| |
Update license header in files.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When utils.py was created, moved functions declaration was not kept for
scope_lookup by mistake, in previous commit it was named
'scope_lookup_id'.
ips_in_scope is a function that maps a list of scopes to the list of ips
contained in it, recursively. (if the scope is a room it will gather all
computers ips in that room). Add 'None' check for its scope param,
avoiding duplication of this check in several other objects using this
function.
Also import utils in 'modes' object, which was not added previously.
Fixes: be84b0a ("Add utils.py")
|
|
Move auxiliary code that will be used by several objects. In this case,
scope filtering and searching by id is going to be used by 'send wol'
too.
Avoid duplicating this code creating utils.py
|