summaryrefslogtreecommitdiff
path: root/dryad
diff options
context:
space:
mode:
Diffstat (limited to 'dryad')
-rw-r--r--dryad/conf/conf.go10
-rw-r--r--dryad/conf/conf_test.go6
2 files changed, 12 insertions, 4 deletions
diff --git a/dryad/conf/conf.go b/dryad/conf/conf.go
index 049fb7b..d8b37cd 100644
--- a/dryad/conf/conf.go
+++ b/dryad/conf/conf.go
@@ -31,11 +31,15 @@ import (
// for Dryad's RPC client and server.
const DefaultRPCPort = 7175
+// DefaultSSHPort is a default port off SSH daemon.
+const DefaultSSHPort = 22
+
// NewConf returns a new instance of General configuration with default values set.
func NewConf() *General {
return &General{
- Address: fmt.Sprintf(":%d", DefaultRPCPort),
- Caps: Capabilities(map[string]string{}),
+ Address: fmt.Sprintf(":%d", DefaultRPCPort),
+ SSHAdress: fmt.Sprintf(":%d", DefaultSSHPort),
+ Caps: Capabilities(map[string]string{}),
User: &User{
Name: "boruta-user",
Groups: []string{},
@@ -60,6 +64,8 @@ type General struct {
Address string `toml:"listen_address"`
// BorutaAddress is used to connect to Boruta server.
BorutaAddress string `toml:"boruta_address"`
+ // SSHAdress is a ssh daemon listen address.
+ SSHAdress string `toml:"ssh_address"`
// Caps are necessary information to register in Boruta.
//
// TODO(amistewicz): This field should be removed when
diff --git a/dryad/conf/conf_test.go b/dryad/conf/conf_test.go
index f8f9997..c220a5f 100644
--- a/dryad/conf/conf_test.go
+++ b/dryad/conf/conf_test.go
@@ -30,6 +30,7 @@ import (
var _ = Describe("Conf", func() {
marshaled := `listen_address = ":7175"
boruta_address = ""
+ssh_address = ":22"
sdcard = "/dev/sdX"
stm_path = "/run/stm.socket"
@@ -40,8 +41,9 @@ stm_path = "/run/stm.socket"
groups = []
`
unmarshaled := &General{
- Address: ":7175",
- Caps: boruta.Capabilities(map[string]string{}),
+ Address: ":7175",
+ SSHAdress: ":22",
+ Caps: boruta.Capabilities(map[string]string{}),
User: &User{
Name: "boruta-user",
Groups: []string{},