Search
Preparing search index...
The search index is not available
@threefold/grid_client
Options
All
Public
Public/Protected
All
Inherited
Externals
Menu
@threefold/grid_client
Network
Class Network
Hierarchy
Network
Index
Constructors
constructor
Properties
_access
Nodes
_endpoints
access
Points
backend
Storage
capacity
config
deployments
ip
Range
name
networks
nodes
reserved
Subnets
rmb
tf
Client
wireguard
Config
Methods
Validate
Free
Subnet
_from
Obj
_save
add
Access
add
Node
delete
delete
Node
delete
Reserved
Ip
exists
generate
Peers
generate
Wireguard
Keypair
get
Access
Nodes
get
Access
Points
get
FreeIP
get
Free
Port
get
Free
Subnet
get
Network
get
Network
Names
get
Networks
Path
get
Node
Endpoint
get
Node
Reserved
Ips
get
Node
Subnet
get
NodeWGListening
Port
get
NodeWGPublic
Key
get
Public
Key
get
Reserved
Subnets
get
Wireguard
Config
has
Access
Point
is
PrivateIP
load
node
Exists
save
save
IfKVStore
Backend
update
Network
update
Network
Deployments
validate
UserIP
wg
RoutingIP
Constructors
constructor
new
Network
(
name
:
string
, ipRange
:
string
, config
:
GridClientConfig
)
:
Network
Parameters
name:
string
ipRange:
string
config:
GridClientConfig
Returns
Network
Properties
_access
Nodes
_access
Nodes
:
number
[]
= []
_endpoints
_endpoints
:
Record
<
string
,
string
>
= {}
access
Points
access
Points
:
AccessPoint
[]
= []
backend
Storage
backend
Storage
:
BackendStorage
capacity
capacity
:
Nodes
config
config
:
GridClientConfig
deployments
deployments
:
Deployment
[]
= []
ip
Range
ip
Range
:
string
name
name
:
string
networks
networks
:
Znet
[]
= []
nodes
nodes
:
Node
[]
= []
reserved
Subnets
reserved
Subnets
:
string
[]
= []
rmb
rmb
:
RMB
tf
Client
tf
Client
:
TFClient
wireguard
Config
wireguard
Config
:
string
Methods
Validate
Free
Subnet
Validate
Free
Subnet
(
subnet
:
any
)
:
string
Parameters
subnet:
any
Returns
string
_from
Obj
_from
Obj
(
net
:
Znet
)
:
Znet
Parameters
net:
Znet
Returns
Znet
_save
_save
(
network
:
any
)
:
Promise
<
void
>
Parameters
network:
any
Returns
Promise
<
void
>
add
Access
add
Access
(
node_id
:
number
, ipv4
:
boolean
)
:
Promise
<
string
>
Parameters
node_id:
number
ipv4:
boolean
Returns
Promise
<
string
>
add
Node
add
Node
(
node_id
:
number
, metadata
?:
string
, description
?:
string
, subnet
?:
string
)
:
Promise
<
Workload
>
Parameters
node_id:
number
metadata:
string
= ""
description:
string
= ""
subnet:
string
= ""
Returns
Promise
<
Workload
>
delete
delete
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
delete
Node
delete
Node
(
node_id
:
number
)
:
Promise
<
number
>
Parameters
node_id:
number
Returns
Promise
<
number
>
delete
Reserved
Ip
delete
Reserved
Ip
(
node_id
:
number
, ip
:
string
)
:
string
Parameters
node_id:
number
ip:
string
Returns
string
exists
exists
(
)
:
Promise
<
boolean
>
Returns
Promise
<
boolean
>
generate
Peers
generate
Peers
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
generate
Wireguard
Keypair
generate
Wireguard
Keypair
(
)
:
WireGuardKeys
Returns
WireGuardKeys
get
Access
Nodes
get
Access
Nodes
(
)
:
Promise
<
number
[]
>
Returns
Promise
<
number
[]
>
get
Access
Points
get
Access
Points
(
)
:
Promise
<
AccessPoint
[]
>
Returns
Promise
<
AccessPoint
[]
>
get
FreeIP
get
FreeIP
(
node_id
:
number
, subnet
?:
string
)
:
string
Parameters
node_id:
number
subnet:
string
= ""
Returns
string
get
Free
Port
get
Free
Port
(
node_id
:
number
)
:
Promise
<
number
>
Parameters
node_id:
number
Returns
Promise
<
number
>
get
Free
Subnet
get
Free
Subnet
(
)
:
string
Returns
string
get
Network
get
Network
(
)
:
Promise
<
any
>
Returns
Promise
<
any
>
get
Network
Names
get
Network
Names
(
)
:
Promise
<
string
[]
>
Returns
Promise
<
string
[]
>
get
Networks
Path
get
Networks
Path
(
)
:
string
Returns
string
get
Node
Endpoint
get
Node
Endpoint
(
node_id
:
number
)
:
Promise
<
string
>
Parameters
node_id:
number
Returns
Promise
<
string
>
get
Node
Reserved
Ips
get
Node
Reserved
Ips
(
node_id
:
number
)
:
string
[]
Parameters
node_id:
number
Returns
string
[]
get
Node
Subnet
get
Node
Subnet
(
node_id
:
number
)
:
string
Parameters
node_id:
number
Returns
string
get
NodeWGListening
Port
get
NodeWGListening
Port
(
node_id
:
number
)
:
number
Parameters
node_id:
number
Returns
number
get
NodeWGPublic
Key
get
NodeWGPublic
Key
(
node_id
:
number
)
:
Promise
<
string
>
Parameters
node_id:
number
Returns
Promise
<
string
>
get
Public
Key
get
Public
Key
(
privateKey
:
string
)
:
string
Parameters
privateKey:
string
Returns
string
get
Reserved
Subnets
get
Reserved
Subnets
(
)
:
string
[]
Returns
string
[]
get
Wireguard
Config
get
Wireguard
Config
(
subnet
:
string
, userprivKey
:
string
, peerPubkey
:
string
, endpoint
:
string
)
:
string
Parameters
subnet:
string
userprivKey:
string
peerPubkey:
string
endpoint:
string
Returns
string
has
Access
Point
has
Access
Point
(
node_id
:
number
)
:
boolean
Parameters
node_id:
number
Returns
boolean
is
PrivateIP
is
PrivateIP
(
ip
:
string
)
:
boolean
Parameters
ip:
string
Returns
boolean
load
load
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
node
Exists
node
Exists
(
node_id
:
number
)
:
boolean
Parameters
node_id:
number
Returns
boolean
save
save
(
contract_id
?:
number
, node_id
?:
number
)
:
Promise
<
void
>
Parameters
contract_id:
number
= 0
node_id:
number
= 0
Returns
Promise
<
void
>
Private
save
IfKVStore
Backend
save
IfKVStore
Backend
(
extrinsics
:
any
)
:
Promise
<
void
>
Parameters
extrinsics:
any
Returns
Promise
<
void
>
update
Network
update
Network
(
znet
:
any
)
:
Znet
Parameters
znet:
any
Returns
Znet
update
Network
Deployments
update
Network
Deployments
(
)
:
void
Returns
void
validate
UserIP
validate
UserIP
(
node_id
:
number
, ip_address
?:
string
)
:
string
Parameters
node_id:
number
ip_address:
string
= ""
Returns
string
wg
RoutingIP
wg
RoutingIP
(
subnet
:
string
)
:
string
Parameters
subnet:
string
Returns
string
Exports
Network
constructor
_access
Nodes
_endpoints
access
Points
backend
Storage
capacity
config
deployments
ip
Range
name
networks
nodes
reserved
Subnets
rmb
tf
Client
wireguard
Config
Validate
Free
Subnet
_from
Obj
_save
add
Access
add
Node
delete
delete
Node
delete
Reserved
Ip
exists
generate
Peers
generate
Wireguard
Keypair
get
Access
Nodes
get
Access
Points
get
FreeIP
get
Free
Port
get
Free
Subnet
get
Network
get
Network
Names
get
Networks
Path
get
Node
Endpoint
get
Node
Reserved
Ips
get
Node
Subnet
get
NodeWGListening
Port
get
NodeWGPublic
Key
get
Public
Key
get
Reserved
Subnets
get
Wireguard
Config
has
Access
Point
is
PrivateIP
load
node
Exists
save
save
IfKVStore
Backend
update
Network
update
Network
Deployments
validate
UserIP
wg
RoutingIP
Generated using
TypeDoc