Initialization needs to specify the role, the default is the client
.
vlan-cli init [ ovc | client ]
Return result:
{
code: 0,
data: {
datadir: 'vlan_data_path',
pubkey: 'pubkey',
role: 'ovc | client'
},
msg: ''
}
vlan-cli pubkey
Return result:
{
code: 0,
data: {
name: 'my_node_name',
pubkey: 'pubkey'
},
msg: ''
}
Need to specify the dnet_id
. You can also customize the dnet_alias
vlan-cli join 'dnet_id' ['dnet_alias']
Return result:
{
code: 0,
data: {
dnet_id: 'xxxx',
dnet_alias: 'xxxx'
},
msg: ''
}
Need to specify the dnet_id
.
vlan-cli remove 'dnet_id'
Return result:
{
code: 0,
data: {
dnet_id: 'xxxx',
dnet_alias: 'xxxx'
},
msg: ''
}
vlan-cli list
Return result:
{
code: 0,
data: [{
dnet_id: 'xxxx',
dnet_alias: 'xxxx'
}],
msg: ''
}
vlan-cli start
Return result:
{
code: 0,
data: {
datadir: 'xxxx',
pid: '1234'
},
msg: ''
}
Need to specify the dnet_id
.
vlan-cli connect 'dnet_id'
Return result:
{
code: 0,
data: [{
dnet_id: 'xxxx',
dnet_alias: 'xxxx'
}],
msg: ''
}
vlan-cli nodelist
Return result:
{
code: 0,
data: [
{
ip: '10.1.0.1',
name: 'node_name',
role: 'client',
ostype: 'windows',
version: 'xx',
reachable: 1,
rtt: 2300,
udpconfirm: 1
}
],
msg: ''
}
vlan-cli stop
Return result:
{
code: 0,
data: {
datadir: 'xxxx',
},
msg: ''
}
# loglevel: 0 - 4
vlan-cli restart [loglevel]
Return result:
{
code: 0,
data: {
datadir: 'xxxx',
pid: '1234'
},
msg: ''
}
vlan-cli status
# Role is client
{
code: 0,
data: {
role: 'client | ovc',
status: 'running | stop',
reachable: 'online | offline | -'
ip: '10.x.x.x | -',
name: 'node name',
c2pkh: 'c2pkh',
pubkey: 'pubkey',
vlan: 'id | alias | -',
datadir: 'vlan_data_path'
},
msg: ''
}
# Role is ovc
{
code: 0,
data: {
role: 'client | ovc',
status: 'running | stop',
ip: '10.x.x.x | -',
name: 'node name',
c2pkh: 'c2pkh',
pubkey: 'pubkey',
datadir: 'vlan_data_path'
},
msg: ''
}
Status code | Description |
---|---|
0 | success |
-10000 | vlan not started |
-10001 | vlan not init |
-10002 | other error |
-10003 | parameter error |