Repository: threefoldtech/zos
Pull request #434 (2019-12-05 14:56:11)

gedis: update gedis way of calling actors
this is to match the version of gedis at https://github.com/threefoldtech/jumpscaleX_core/commit/ab9122aafd8a6b1035a058bc507cf04ff69a7bd0

Before we can merge this some tests still needs to be done and https://github.com/threefoldtech/jumpscaleX_core/issues/310 has to be fixed

codecov[bot]: # [Codecov](https://codecov.io/gh/threefoldtech/zos/pull/434?src=pr&el=h1) Report
> Merging [#434](https://codecov.io/gh/threefoldtech/zos/pull/434?src=pr&el=desc) into [master](https://codecov.io/gh/threefoldtech/zos/commit/6b752ec61c0df88790419ba446fae45233fb4689?src=pr&el=desc) will **increase** coverage by `0.07%`.
> The diff coverage is `70%`.

[![Impacted file tree graph](https://codecov.io/gh/threefoldtech/zos/pull/434/graphs/tree.svg?width=650&token=f7Vmq1OAEm&height=150&src=pr)](https://codecov.io/gh/threefoldtech/zos/pull/434?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master     #434      +/-   ##
==========================================
+ Coverage   41.04%   41.12%   +0.07%     
==========================================
  Files          64       64              
  Lines        4137     4134       -3     
==========================================
+ Hits         1698     1700       +2     
+ Misses       2209     2205       -4     
+ Partials      230      229       -1
```


| [Impacted Files](https://codecov.io/gh/threefoldtech/zos/pull/434?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/environment/environment.go](https://codecov.io/gh/threefoldtech/zos/pull/434/diff?src=pr&el=tree#diff-cGtnL2Vudmlyb25tZW50L2Vudmlyb25tZW50Lmdv) | `69.76% <ø> (+3.1%)` | :arrow_up: |
| [pkg/gedis/commands\_provision.go](https://codecov.io/gh/threefoldtech/zos/pull/434/diff?src=pr&el=tree#diff-cGtnL2dlZGlzL2NvbW1hbmRzX3Byb3Zpc2lvbi5nbw==) | `45.49% <100%> (ø)` | :arrow_up: |
| [pkg/gedis/commands\_identity.go](https://codecov.io/gh/threefoldtech/zos/pull/434/diff?src=pr&el=tree#diff-cGtnL2dlZGlzL2NvbW1hbmRzX2lkZW50aXR5Lmdv) | `62.22% <100%> (ø)` | :arrow_up: |
| [pkg/gedis/gedis.go](https://codecov.io/gh/threefoldtech/zos/pull/434/diff?src=pr&el=tree#diff-cGtnL2dlZGlzL2dlZGlzLmdv) | `14.28% <25%> (+0.25%)` | :arrow_up: |
| [pkg/gedis/commands\_capacity.go](https://codecov.io/gh/threefoldtech/zos/pull/434/diff?src=pr&el=tree#diff-cGtnL2dlZGlzL2NvbW1hbmRzX2NhcGFjaXR5Lmdv) | `34.37% <33.33%> (ø)` | :arrow_up: |
| [pkg/gedis/commands\_network.go](https://codecov.io/gh/threefoldtech/zos/pull/434/diff?src=pr&el=tree#diff-cGtnL2dlZGlzL2NvbW1hbmRzX25ldHdvcmsuZ28=) | `66.66% <66.66%> (ø)` | :arrow_up: |
| [pkg/versioned/data.go](https://codecov.io/gh/threefoldtech/zos/pull/434/diff?src=pr&el=tree#diff-cGtnL3ZlcnNpb25lZC9kYXRhLmdv) | `84.31% <0%> (+3.92%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/threefoldtech/zos/pull/434?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/threefoldtech/zos/pull/434?src=pr&el=footer). Last update [6b752ec...00d0a88](https://codecov.io/gh/threefoldtech/zos/pull/434?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/cmds/capacityd/main.go b/cmds/capacityd/main.go
index f826d2c7..440ea609 100644
--- a/cmds/capacityd/main.go
+++ b/cmds/capacityd/main.go
@@ -117,7 +117,7 @@ func bcdbClient() (capacity.Store, error) {
 	}
 
 	// use gedis for production bcdb
-	store, err := gedis.New(env.BcdbURL, env.BcdbNamespace, env.BcdbPassword)
+	store, err := gedis.New(env.BcdbURL, env.BcdbPassword)
 	if err != nil {
 		return nil, errors.Wrap(err, "fail to connect to BCDB")
 	}
diff --git a/cmds/identityd/main.go b/cmds/identityd/main.go
index 3f6f0d47..7529ae4c 100644
--- a/cmds/identityd/main.go
+++ b/cmds/identityd/main.go
@@ -404,7 +404,7 @@ func bcdbClient() (identity.IDStore, error) {
 	}
 
 	// use gedis for production bcdb
-	store, err := gedis.New(env.BcdbURL, env.BcdbNamespace, env.BcdbPassword)
+	store, err := gedis.New(env.BcdbURL, env.BcdbPassword)
 	if err != nil {
 		return nil, errors.Wrap(err, "fail to connect to BCDB")
 	}
diff --git a/cmds/networkd/main.go b/cmds/networkd/main.go
index ac160419..5da87cde 100644
--- a/cmds/networkd/main.go
+++ b/cmds/networkd/main.go
@@ -214,7 +214,7 @@ func bcdbClient() (network.TNoDB, error) {
 	}
 
 	// use gedis for production bcdb
-	store, err := gedis.New(env.BcdbURL, env.BcdbNamespace, env.BcdbPassword)
+	store, err := gedis.New(env.BcdbURL, env.BcdbPassword)
 	if err != nil {
 		return nil, errors.Wrap(err, "fail to connect to BCDB")
 	}
diff --git a/cmds/provisiond/main.go b/cmds/provisiond/main.go
index 8ca8267a..60241e88 100644
--- a/cmds/provisiond/main.go
+++ b/cmds/provisiond/main.go
@@ -132,7 +132,7 @@ func bcdbClient() (store, error) {
 	}
 
 	// use gedis for production bcdb
-	store, err := gedis.New(env.BcdbURL, env.BcdbNamespace, env.BcdbPassword)
+	store, err := gedis.New(env.BcdbURL, env.BcdbPassword)
 	if err != nil {
 		return nil, errors.Wrap(err, "fail to connect to BCDB")
 	}
diff --git a/pkg/environment/environment.go b/pkg/environment/environment.go
index a10f4dce..279bff06 100644
--- a/pkg/environment/environment.go
+++ b/pkg/environment/environment.go
@@ -14,9 +14,8 @@ import (
 type Environment struct {
 	RunningMode RunningMode
 
-	BcdbURL       string
-	BcdbNamespace string
-	BcdbPassword  string
+	BcdbURL      string
+	BcdbPassword string
 
 	FarmerID pkg.FarmID
 	Orphan   bool
@@ -50,18 +49,17 @@ var (
 	}
 
 	envTest = Environment{
-		RunningMode:   RunningTest,
-		BcdbURL:       "tcp://explorer.testnet.grid.tf:8901",
-		BcdbNamespace: "default",
+		RunningMode: RunningTest,
+		// BcdbURL:     "tcp://explorer.testnet.grid.tf:8901",
+		BcdbURL: "tcp://0.tcp.ngrok.io:14669",
 		// ProvisionTimeout:  120,
 		// ProvisionInterval: 10,
 	}
 
 	// same as testnet for now. will be updated the day of the launch of production network
 	envProd = Environment{
-		RunningMode:   RunningMain,
-		BcdbURL:       "tcp://explorer.testnet.grid.tf:8901",
-		BcdbNamespace: "default",
+		RunningMode: RunningMain,
+		BcdbURL:     "tcp://explorer.testnet.grid.tf:8901",
 		// ProvisionTimeout:  240,
 		// ProvisionInterval: 20,
 	}
@@ -132,10 +130,6 @@ func getEnvironmentFromParams(params kernel.Params) (Environment, error) {
 		env.BcdbURL = e
 	}
 
-	if e := os.Getenv("ZOS_BCDB_NAMESPACE"); e != "" {
-		env.BcdbNamespace = e
-	}
-
 	if e := os.Getenv("ZOS_BCDB_PASSWORD"); e != "" {
 		env.BcdbPassword = e
 	}
diff --git a/pkg/gedis/commands_capacity.go b/pkg/gedis/commands_capacity.go
index 1257d4ae..d22eec3f 100644
--- a/pkg/gedis/commands_capacity.go
+++ b/pkg/gedis/commands_capacity.go
@@ -8,7 +8,7 @@ import (
 //UptimeUpdate send the uptime of the node to BCDB
 func (g *Gedis) UptimeUpdate(nodeID pkg.Identifier, uptime uint64) error {
 
-	_, err := g.Send("nodes", "uptime_update", Args{
+	_, err := g.Send("tfgrid.directory.nodes", "uptime_update", Args{
 		"node_id": nodeID.Identity(),
 		"uptime":  uptime,
 	})
@@ -17,7 +17,7 @@ func (g *Gedis) UptimeUpdate(nodeID pkg.Identifier, uptime uint64) error {
 }
 
 func (g *Gedis) updateGenericNodeCapacity(captype string, node pkg.Identifier, mru, cru, hru, sru uint64) error {
-	_, err := g.Send("nodes", "update_"+captype+"_capacity", Args{
+	_, err := g.Send("tfgrid.directory.nodes", "update_"+captype+"_capacity", Args{
 		"node_id": node.Identity(),
 		"resource": directory.TfgridNodeResourceAmount1{
 			Cru: int64(cru),
@@ -47,7 +47,7 @@ func (g *Gedis) UpdateUsedNodeCapacity(node pkg.Identifier, mru, cru, hru, sru u
 
 // SendHardwareProof sends a dump of hardware and disks to BCDB
 func (g *Gedis) SendHardwareProof(node pkg.Identifier, dmi interface{}, disks interface{}) error {
-	_, err := g.Send("nodes", "add_proof", Args{
+	_, err := g.Send("tfgrid.directory.nodes", "add_proof", Args{
 		"node_id": node.Identity(),
 		"proof": map[string]interface{}{
 			"hardware": dmi,
diff --git a/pkg/gedis/commands_identity.go b/pkg/gedis/commands_identity.go
index 7498276f..d21af3e0 100644
--- a/pkg/gedis/commands_identity.go
+++ b/pkg/gedis/commands_identity.go
@@ -43,7 +43,7 @@ func (g *Gedis) RegisterNode(nodeID pkg.Identifier, farmID pkg.FarmID, version s
 		node.NodeIDv1 = idv1
 	}
 
-	resp, err := Bytes(g.Send("nodes", "add", Args{"node": node}))
+	resp, err := Bytes(g.Send("tfgrid.directory.nodes", "add", Args{"node": node}))
 
 	if err != nil {
 		return "", err
@@ -61,7 +61,7 @@ func (g *Gedis) RegisterNode(nodeID pkg.Identifier, farmID pkg.FarmID, version s
 
 // ListNode implements pkg.IdentityManager interface
 func (g *Gedis) ListNode(farmID pkg.FarmID, country string, city string) ([]types.Node, error) {
-	resp, err := Bytes(g.Send("nodes", "list", Args{
+	resp, err := Bytes(g.Send("tfgrid.directory.nodes", "list", Args{
 		"farm_id": farmID,
 		"country": country,
 		"city":    city,
@@ -89,7 +89,7 @@ func (g *Gedis) ListNode(farmID pkg.FarmID, country string, city string) ([]type
 
 //RegisterFarm implements pkg.IdentityManager interface
 func (g *Gedis) RegisterFarm(tid uint64, name string, email string, wallet []string) (pkg.FarmID, error) {
-	resp, err := Bytes(g.Send("farms", "register", Args{
+	resp, err := Bytes(g.Send("tfgrid.directory.farms", "register", Args{
 		"farm": directory.TfgridFarm1{
 			ThreebotID:      tid,
 			Name:            name,
@@ -120,7 +120,7 @@ func (g *Gedis) RegisterFarm(tid uint64, name string, email string, wallet []str
 
 //GetNode implements pkg.IdentityManager interface
 func (g *Gedis) GetNode(nodeID pkg.Identifier) (*types.Node, error) {
-	resp, err := Bytes(g.Send("nodes", "get", Args{
+	resp, err := Bytes(g.Send("tfgrid.directory.nodes", "get", Args{
 		"node_id": nodeID.Identity(),
 	}))
 
@@ -199,7 +199,7 @@ func (g *Gedis) GetFarm(farm pkg.Identifier) (*network.Farm, error) {
 		return nil, errors.Wrap(err, "invalid farm id")
 	}
 
-	resp, err := Bytes(g.Send("farms", "get", Args{
+	resp, err := Bytes(g.Send("tfgrid.directory.farms", "get", Args{
 		"farm_id": id,
 	}))
 
@@ -218,7 +218,7 @@ func (g *Gedis) GetFarm(farm pkg.Identifier) (*network.Farm, error) {
 
 //ListFarm implements pkg.IdentityManager interface
 func (g *Gedis) ListFarm(country string, city string) ([]network.Farm, error) {
-	resp, err := Bytes(g.Send("farms", "list", Args{
+	resp, err := Bytes(g.Send("tfgrid.directory.farms", "list", Args{
 		"country": country,
 		"city":    city,
 	}))
diff --git a/pkg/gedis/commands_network.go b/pkg/gedis/commands_network.go
index f8e0848c..95291df0 100644
--- a/pkg/gedis/commands_network.go
+++ b/pkg/gedis/commands_network.go
@@ -33,7 +33,7 @@ func (g *Gedis) getLocalInterfaces(ifaces []types.IfaceInfo) []directory.TfgridN
 func (g *Gedis) PublishInterfaces(local pkg.Identifier, ifaces []types.IfaceInfo) error {
 	output := g.getLocalInterfaces(ifaces)
 
-	_, err := g.Send("nodes", "publish_interfaces", Args{
+	_, err := g.Send("tfgrid.directory.nodes", "publish_interfaces", Args{
 		"node_id": local.Identity(),
 		"ifaces":  output,
 	})
@@ -73,7 +73,7 @@ func (g *Gedis) SetPublicIface(node pkg.Identifier, pub *types.PubIface) error {
 		public.Gw6 = pub.GW6
 	}
 
-	_, err := g.Send("nodes", "set_public_iface", Args{
+	_, err := g.Send("tfgrid.directory.nodes", "set_public_iface", Args{
 		"node_id": node.Identity(),
 		"public":  public,
 	})
@@ -83,7 +83,7 @@ func (g *Gedis) SetPublicIface(node pkg.Identifier, pub *types.PubIface) error {
 
 //PublishWGPort implements network.TNoDB interface
 func (g *Gedis) PublishWGPort(node pkg.Identifier, ports []uint) error {
-	_, err := g.Send("nodes", "publish_wg_ports", Args{
+	_, err := g.Send("tfgrid.directory.nodes", "publish_wg_ports", Args{
 		"node_id": node.Identity(),
 		"ports":   ports,
 	})
diff --git a/pkg/gedis/commands_provision.go b/pkg/gedis/commands_provision.go
index 285ef762..3f8e3979 100644
--- a/pkg/gedis/commands_provision.go
+++ b/pkg/gedis/commands_provision.go
@@ -56,7 +56,7 @@ func (g *Gedis) Reserve(r *provision.Reservation, nodeID pkg.Identifier) (string
 		}
 	}
 
-	result, err := Bytes(g.Send("workload_manager", "reservation_register", Args{
+	result, err := Bytes(g.Send("tfgrid.directory.workload_manager", "reservation_register", Args{
 		"reservation": res,
 	}))
 
@@ -74,7 +74,7 @@ func (g *Gedis) Reserve(r *provision.Reservation, nodeID pkg.Identifier) (string
 
 // Get implements provision.ReservationGetter
 func (g *Gedis) Get(id string) (*provision.Reservation, error) {
-	result, err := Bytes(g.Send("workload_manager", "workload_get", Args{
+	result, err := Bytes(g.Send("tfgrid.directory.workload_manager", "workload_get", Args{
 		"gwid": id,
 	}))
 
@@ -97,7 +97,7 @@ func (g *Gedis) Get(id string) (*provision.Reservation, error) {
 // to get the reservation part.
 func (g *Gedis) Poll(nodeID pkg.Identifier, from uint64) ([]*provision.Reservation, error) {
 
-	result, err := Bytes(g.Send("workload_manager", "workloads_list", Args{
+	result, err := Bytes(g.Send("tfgrid.directory.workload_manager", "workloads_list", Args{
 		"node_id": nodeID.Identity(),
 		"cursor":  from,
 	}))
@@ -165,7 +165,7 @@ func (g *Gedis) Feedback(id string, r *provision.Result) error {
 		Epoch:      schema.Date{r.Created},
 	}
 
-	_, err := g.Send("workload_manager", "set_workload_result", Args{
+	_, err := g.Send("tfgrid.directory.workload_manager", "set_workload_result", Args{
 		"global_workload_id": id,
 		"result":             result,
 	})
diff --git a/pkg/gedis/gedis.go b/pkg/gedis/gedis.go
index dc12cee9..fa9a9ce1 100644
--- a/pkg/gedis/gedis.go
+++ b/pkg/gedis/gedis.go
@@ -46,22 +46,20 @@ type Pool interface {
 
 // Gedis struct represent a client to a gedis server
 type Gedis struct {
-	pool      Pool
-	namespace string
-	password  string
+	pool     Pool
+	password string
 }
 
 // New creates a new Gedis client
-func New(address, namespace, password string) (*Gedis, error) {
+func New(address, password string) (*Gedis, error) {
 	pool, err := newRedisPool(address)
 	if err != nil {
 		return nil, err
 	}
 
 	return &Gedis{
-		pool:      pool,
-		namespace: namespace,
-		password:  password,
+		pool:     pool,
+		password: password,
 	}, nil
 }
 
@@ -80,7 +78,7 @@ func (g *Gedis) Ping() (string, error) {
 }
 
 func (g *Gedis) cmd(actor, method string) string {
-	return fmt.Sprintf("%s.%s.%s", g.namespace, actor, method)
+	return fmt.Sprintf("%s.%s", actor, method)
 }
 
 func newRedisPool(address string) (*redis.Pool, error) {
diff --git a/tools/tfuser/main.go b/tools/tfuser/main.go
index 889c9932..11610f1d 100644
--- a/tools/tfuser/main.go
+++ b/tools/tfuser/main.go
@@ -306,7 +306,7 @@ func getClient(addr string) (clientIface, error) {
 			provision.NewHTTPStore(addr),
 		}, nil
 	case "tcp":
-		c, err := gedis.New(addr, "default", "")
+		c, err := gedis.New(addr, "")
 		return client{
 			c,
 			c,


Test patch:
diff --git a/pkg/gedis/commands_identity_test.go b/pkg/gedis/commands_identity_test.go
index 05088d4a..c57508ad 100644
--- a/pkg/gedis/commands_identity_test.go
+++ b/pkg/gedis/commands_identity_test.go
@@ -16,8 +16,7 @@ func TestRegisterFarm(t *testing.T) {
 	require := require.New(t)
 	pool, conn := getTestPool()
 	gedis := Gedis{
-		pool:      pool,
-		namespace: "default",
+		pool: pool,
 	}
 
 	args := Args{
@@ -29,7 +28,7 @@ func TestRegisterFarm(t *testing.T) {
 		},
 	}
 
-	conn.On("Do", "default.farms.register", mustMarshal(t, args)).
+	conn.On("Do", "tfgrid.directory.farms.register", mustMarshal(t, args)).
 		Return(mustMarshal(t, Args{"farm_id": 123}), nil)
 
 	id, err := gedis.RegisterFarm(
@@ -48,8 +47,7 @@ func TestRegisterNode(t *testing.T) {
 	require := require.New(t)
 	pool, conn := getTestPool()
 	gedis := Gedis{
-		pool:      pool,
-		namespace: "default",
+		pool: pool,
 	}
 
 	l, err := geoip.Fetch()
@@ -71,7 +69,7 @@ func TestRegisterNode(t *testing.T) {
 		},
 	}
 
-	conn.On("Do", "default.nodes.add", mustMarshal(t, args)).
+	conn.On("Do", "tfgrid.directory.nodes.add", mustMarshal(t, args)).
 		Return(mustMarshal(t, Args{"node_id": "node-1"}), nil)
 
 	id, err := gedis.RegisterNode(
@@ -90,8 +88,7 @@ func TestListNode(t *testing.T) {
 	require := require.New(t)
 	pool, conn := getTestPool()
 	gedis := Gedis{
-		pool:      pool,
-		namespace: "default",
+		pool: pool,
 	}
 
 	args := Args{
@@ -100,7 +97,7 @@ func TestListNode(t *testing.T) {
 		"city":    "cairo",
 	}
 
-	conn.On("Do", "default.nodes.list", mustMarshal(t, args)).
+	conn.On("Do", "tfgrid.directory.nodes.list", mustMarshal(t, args)).
 		Return(mustMarshal(t, Args{"nodes": []directory.TfgridNode2{
 			{NodeID: "node-1"},
 			{NodeID: "node-2"},
@@ -120,15 +117,14 @@ func TestGetNode(t *testing.T) {
 	require := require.New(t)
 	pool, conn := getTestPool()
 	gedis := Gedis{
-		pool:      pool,
-		namespace: "default",
+		pool: pool,
 	}
 
 	args := Args{
 		"node_id": "node-1",
 	}
 
-	conn.On("Do", "default.nodes.get", mustMarshal(t, args)).
+	conn.On("Do", "tfgrid.directory.nodes.get", mustMarshal(t, args)).
 		Return(mustMarshal(t, directory.TfgridNode2{
 			NodeID: "node-1",
 		}), nil)
@@ -146,15 +142,14 @@ func TestGetFarm(t *testing.T) {
 	require := require.New(t)
 	pool, conn := getTestPool()
 	gedis := Gedis{
-		pool:      pool,
-		namespace: "default",
+		pool: pool,
 	}
 
 	args := Args{
 		"farm_id": 100,
 	}
 
-	conn.On("Do", "default.farms.get", mustMarshal(t, args)).
+	conn.On("Do", "tfgrid.directory.farms.get", mustMarshal(t, args)).
 		Return(mustMarshal(t, directory.TfgridFarm1{
 			ID:   100,
 			Name: "farm-1",
@@ -174,8 +169,7 @@ func TestListFarm(t *testing.T) {
 	require := require.New(t)
 	pool, conn := getTestPool()
 	gedis := Gedis{
-		pool:      pool,
-		namespace: "default",
+		pool: pool,
 	}
 
 	args := Args{
@@ -183,7 +177,7 @@ func TestListFarm(t *testing.T) {
 		"city":    "cairo",
 	}
 
-	conn.On("Do", "default.farms.list", mustMarshal(t, args)).
+	conn.On("Do", "tfgrid.directory.farms.list", mustMarshal(t, args)).
 		Return(mustMarshal(t, Args{"farms": []directory.TfgridFarm1{
 			{ID: 1, Name: "farm-1"},
 			{ID: 2, Name: "farm-2"},
@@ -202,8 +196,7 @@ func TestUpdateGenericNodeCapacity(t *testing.T) {
 	require := require.New(t)
 	pool, conn := getTestPool()
 	gedis := Gedis{
-		pool:      pool,
-		namespace: "default",
+		pool: pool,
 	}
 
 	node := pkg.StrIdentifier("node-1")
@@ -219,7 +212,7 @@ func TestUpdateGenericNodeCapacity(t *testing.T) {
 	}
 
 	const captype = "total"
-	action := fmt.Sprintf("default.nodes.update_%s_capacity", captype)
+	action := fmt.Sprintf("tfgrid.directory.nodes.update_%s_capacity", captype)
 	conn.On("Do", action, mustMarshal(t, args)).
 		Return(nil, nil)
 
diff --git a/pkg/gedis/commands_network_test.go b/pkg/gedis/commands_network_test.go
index 880404b4..425828ba 100644
--- a/pkg/gedis/commands_network_test.go
+++ b/pkg/gedis/commands_network_test.go
@@ -16,8 +16,7 @@ func TestNetworkPublishInterfaces(t *testing.T) {
 	require := require.New(t)
 	pool, conn := getTestPool()
 	gedis := Gedis{
-		pool:      pool,
-		namespace: "default",
+		pool: pool,
 	}
 
 	id := pkg.StrIdentifier("node-1")
@@ -37,7 +36,7 @@ func TestNetworkPublishInterfaces(t *testing.T) {
 		},
 	}
 
-	conn.On("Do", "default.nodes.publish_interfaces", mustMarshal(t, args)).
+	conn.On("Do", "tfgrid.directory.nodes.publish_interfaces", mustMarshal(t, args)).
 		Return(nil, nil)
 
 	inf := types.IfaceInfo{
@@ -55,8 +54,7 @@ func TestNetworkSetPublicIface(t *testing.T) {
 	require := require.New(t)
 	pool, conn := getTestPool()
 	gedis := Gedis{
-		pool:      pool,
-		namespace: "default",
+		pool: pool,
 	}
 
 	id := pkg.StrIdentifier("node-1")
@@ -70,7 +68,7 @@ func TestNetworkSetPublicIface(t *testing.T) {
 		},
 	}
 
-	conn.On("Do", "default.nodes.set_public_iface", mustMarshal(t, args)).
+	conn.On("Do", "tfgrid.directory.nodes.set_public_iface", mustMarshal(t, args)).
 		Return(nil, nil)
 
 	err := gedis.SetPublicIface(id, &types.PubIface{
diff --git a/pkg/gedis/commands_provision_test.go b/pkg/gedis/commands_provision_test.go
index df206a53..ec7277aa 100644
--- a/pkg/gedis/commands_provision_test.go
+++ b/pkg/gedis/commands_provision_test.go
@@ -19,8 +19,7 @@ func TestProvisionGet(t *testing.T) {
 	require := require.New(t)
 	pool, conn := getTestPool()
 	gedis := Gedis{
-		pool:      pool,
-		namespace: "default",
+		pool: pool,
 	}
 
 	id := "id"
@@ -31,7 +30,7 @@ func TestProvisionGet(t *testing.T) {
 
 	workload := `{"workload_id": 10, "type": 0, "size": 100}`
 
-	conn.On("Do", "default.workload_manager.workload_get", mustMarshal(t, args)).
+	conn.On("Do", "tfgrid.directory.workload_manager.workload_get", mustMarshal(t, args)).
 		Return(mustMarshal(t, Args{
 			"workload_id": id,
 			"type":        types.TfgridReservationWorkload1TypeVolume,
@@ -51,8 +50,7 @@ func TestProvisionPoll(t *testing.T) {
 	require := require.New(t)
 	pool, conn := getTestPool()
 	gedis := Gedis{
-		pool:      pool,
-		namespace: "default",
+		pool: pool,
 	}
 
 	node := pkg.StrIdentifier("node-1")
@@ -65,7 +63,7 @@ func TestProvisionPoll(t *testing.T) {
 	workloadVol := `{"workload_id": 1, "type": 0, "size": 100}`
 	workloadZdb := `{"workload_id": 1, "mode": 0, "size": 100}`
 
-	conn.On("Do", "default.workload_manager.workloads_list", mustMarshal(t, args)).
+	conn.On("Do", "tfgrid.directory.workload_manager.workloads_list", mustMarshal(t, args)).
 		Return(mustMarshal(t, Args{
 			"workloads": []types.TfgridReservationWorkload1{
 				{
@@ -95,7 +93,7 @@ func TestProvisionPoll(t *testing.T) {
 		"cursor":  10,
 	}
 
-	conn.On("Do", "default.workload_manager.workloads_list", mustMarshal(t, args)).
+	conn.On("Do", "tfgrid.directory.workload_manager.workloads_list", mustMarshal(t, args)).
 		Return(mustMarshal(t, Args{
 			"workloads": []types.TfgridReservationWorkload1{
 				{
@@ -125,8 +123,7 @@ func TestProvisionFeedback(t *testing.T) {
 	require := require.New(t)
 	pool, conn := getTestPool()
 	gedis := Gedis{
-		pool:      pool,
-		namespace: "default",
+		pool: pool,
 	}
 
 	id := "101"
@@ -151,7 +148,7 @@ func TestProvisionFeedback(t *testing.T) {
 		},
 	}
 
-	conn.On("Do", "default.workload_manager.set_workload_result", mustMarshal(t, args)).
+	conn.On("Do", "tfgrid.directory.workload_manager.set_workload_result", mustMarshal(t, args)).
 		Return(nil, nil)
 
 	err := gedis.Feedback(id, &result)
@@ -164,8 +161,7 @@ func TestProvisionReserve(t *testing.T) {
 	require := require.New(t)
 	pool, conn := getTestPool()
 	gedis := Gedis{
-		pool:      pool,
-		namespace: "default",
+		pool: pool,
 	}
 
 	id := pkg.StrIdentifier("101")
@@ -201,7 +197,7 @@ func TestProvisionReserve(t *testing.T) {
 		},
 	}
 
-	conn.On("Do", "default.workload_manager.reservation_register", mock.MatchedBy(func(in []byte) bool {
+	conn.On("Do", "tfgrid.directory.workload_manager.reservation_register", mock.MatchedBy(func(in []byte) bool {
 		EqualJSON(t, mustMarshal(t, args), in)
 		return true
 	})).
diff --git a/pkg/gedis/gedis_test.go b/pkg/gedis/gedis_test.go
index ae535456..209565cc 100644
--- a/pkg/gedis/gedis_test.go
+++ b/pkg/gedis/gedis_test.go
@@ -100,11 +100,10 @@ func TestGedisSend(t *testing.T) {
 	pool, conn := getTestPool()
 
 	gedis := &Gedis{
-		pool:      pool,
-		namespace: "default",
+		pool: pool,
 	}
 
-	conn.On("Do", "default.actor.method", mock.AnythingOfType("[]uint8")).
+	conn.On("Do", "actor.method", mock.AnythingOfType("[]uint8")).
 		Return("mocked result", nil)
 
 	args := Args{
@@ -117,6 +116,6 @@ func TestGedisSend(t *testing.T) {
 
 	expected := mustMarshal(t, args)
 
-	conn.AssertCalled(t, "Do", "default.actor.method", expected)
+	conn.AssertCalled(t, "Do", "actor.method", expected)
 	conn.AssertCalled(t, "Close")
 }