REPL for interacting with netmap in NEOFS and applying placement rules to it
Clone or download
fyrchik Merge pull request #4 from nspcc-dev/fix/improve_doc
document all exported functions
Latest commit 70a45ba Jan 14, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Enable circle-ci (#1) Jan 3, 2019
examples Initial Dec 29, 2018
netgraph document all exported functions Jan 14, 2019
vendor Initial Dec 29, 2018
.gitignore Initial Dec 29, 2018
Dockerfile Initial Dec 29, 2018
LICENSE add license Dec 29, 2018
Makefile Initial Dec 29, 2018
README.md Initial Dec 29, 2018
go.mod Initial Dec 29, 2018
go.sum Initial Dec 29, 2018
main.go Initial Dec 29, 2018

README.md

NetMap

Demo

asciicast

select 1 Country, filter Location NE Asia Example 1

select 2 City, filter Location EQ Europe Example 2

Description

This is REPL for interacting with netmap in NEOFS and applying placement rules to it. Netmap and CRUSH enchacement with FILTERs is described in research plan.

Commands

To see help for specific command type command help.

help

help

Get a list of commands.

exit

exit

Exit program.

load

load <filename>

Load netmap from specified file.

save

save <filename>

Save netmap to specified file.

clear

clear

Clear current netmap.

select

select <number> <key>

Example:

>>> add 1 /Location:Europe/Country:Germany
>>> add 2 /Location:Europe/Country:Austria
>>> add 3 /Location:Asia/Country:Korea
>>> add 4 /Location:Asia/Country:Japan
>>> select 1 Location
>>> select 2 Country

filter

filter <key> <operation> <value>

Operation can be one of EQ, NE, LT, LE, GT, GE

Example:

>>> add 1 /Location:Europe/Country:Germany
>>> add 2 /Location:Europe/Country:Austria
>>> filter Country NE Austria

get-selection

get-selection

Get nodes from current selection.

Example:

>>> load /examples/map2
>>> select 1 Country
>>> filter Location NE Asia
>>> get-selection
[13 14]

clear-selection

clear-selection

Clear current selection.

dump-selection

dump-selection <filename>

Dump netmap in graphical format. If using docker, /pics directory is mounted as temp on host.