veyron2/services/mgmt/node,veyron/services/mgmt/node,veyron/tools/mgmt: rename node->device, cl 3 of N (go/vissue/496)
Rename files and packages.
Change-Id: I29199a97c2ca6d6eb721e0d9fe41a71044e52579
diff --git a/lib/netstate/netstate.go b/lib/netstate/netstate.go
index e9a61a5..ba23e70 100644
--- a/lib/netstate/netstate.go
+++ b/lib/netstate/netstate.go
@@ -369,8 +369,8 @@
return diffAB(a, b)
}
-// SameMachine returns true if the provided addr is on the node
-// executing this function.
+// SameMachine returns true if the provided addr is on the device executing this
+// function.
func SameMachine(addr net.Addr) (bool, error) {
// The available interfaces may change between calls.
addrs, err := GetAll()
diff --git a/lib/signals/signals_test.go b/lib/signals/signals_test.go
index 4220712..198f830 100644
--- a/lib/signals/signals_test.go
+++ b/lib/signals/signals_test.go
@@ -25,7 +25,7 @@
"veyron.io/veyron/veyron/lib/testutil/security"
"veyron.io/veyron/veyron/profiles"
vflag "veyron.io/veyron/veyron/security/flag"
- "veyron.io/veyron/veyron/services/mgmt/node"
+ "veyron.io/veyron/veyron/services/mgmt/device"
)
// TestHelperProcess is boilerplate for the modules setup.
@@ -327,7 +327,7 @@
if ep, err = server.Listen(profiles.LocalListenSpec); err != nil {
t.Fatalf("Got error: %v", err)
}
- if err := server.Serve("", node.ConfigServer(&configServer{ch}), vflag.NewAuthorizerOrDie()); err != nil {
+ if err := server.Serve("", device.ConfigServer(&configServer{ch}), vflag.NewAuthorizerOrDie()); err != nil {
t.Fatalf("Got error: %v", err)
}
return server, naming.JoinAddressName(ep.String(), ""), ch
diff --git a/runtimes/google/rt/mgmt_test.go b/runtimes/google/rt/mgmt_test.go
index ae621e4..a43c2d7 100644
--- a/runtimes/google/rt/mgmt_test.go
+++ b/runtimes/google/rt/mgmt_test.go
@@ -24,7 +24,7 @@
"veyron.io/veyron/veyron/profiles"
"veyron.io/veyron/veyron/runtimes/google/rt"
vflag "veyron.io/veyron/veyron/security/flag"
- "veyron.io/veyron/veyron/services/mgmt/node"
+ "veyron.io/veyron/veyron/services/mgmt/device"
)
var profileOpt = options.Profile{profiles.New()}
@@ -286,7 +286,7 @@
if ep, err = server.Listen(profiles.LocalListenSpec); err != nil {
t.Fatalf("Got error: %v", err)
}
- if err := server.Serve("", node.ConfigServer(&configServer{ch}), vflag.NewAuthorizerOrDie()); err != nil {
+ if err := server.Serve("", device.ConfigServer(&configServer{ch}), vflag.NewAuthorizerOrDie()); err != nil {
t.Fatalf("Got error: %v", err)
}
return server, naming.JoinAddressName(ep.String(), ""), ch
diff --git a/services/mgmt/node/config.vdl b/services/mgmt/device/config.vdl
similarity index 89%
rename from services/mgmt/node/config.vdl
rename to services/mgmt/device/config.vdl
index 71ab83a..67813d1 100644
--- a/services/mgmt/node/config.vdl
+++ b/services/mgmt/device/config.vdl
@@ -1,4 +1,4 @@
-package node
+package device
// Config is an RPC API to the config service.
type Config interface {
diff --git a/services/mgmt/node/config.vdl.go b/services/mgmt/device/config.vdl.go
similarity index 98%
rename from services/mgmt/node/config.vdl.go
rename to services/mgmt/device/config.vdl.go
index 42bb189..6fbd08a 100644
--- a/services/mgmt/node/config.vdl.go
+++ b/services/mgmt/device/config.vdl.go
@@ -1,7 +1,7 @@
// This file was auto-generated by the veyron vdl tool.
// Source: config.vdl
-package node
+package device
import (
// The non-user imports are prefixed with "__" to prevent collisions.
@@ -141,7 +141,7 @@
// descConfig hides the desc to keep godoc clean.
var descConfig = __ipc.InterfaceDesc{
Name: "Config",
- PkgPath: "veyron.io/veyron/veyron/services/mgmt/node",
+ PkgPath: "veyron.io/veyron/veyron/services/mgmt/device",
Doc: "// Config is an RPC API to the config service.",
Methods: []__ipc.MethodDesc{
{
diff --git a/services/mgmt/node/config/config.go b/services/mgmt/device/config/config.go
similarity index 100%
rename from services/mgmt/node/config/config.go
rename to services/mgmt/device/config/config.go
diff --git a/services/mgmt/node/config/config_test.go b/services/mgmt/device/config/config_test.go
similarity index 98%
rename from services/mgmt/node/config/config_test.go
rename to services/mgmt/device/config/config_test.go
index 5735b87..d053126 100644
--- a/services/mgmt/node/config/config_test.go
+++ b/services/mgmt/device/config/config_test.go
@@ -7,7 +7,7 @@
"strings"
"testing"
- "veyron.io/veyron/veyron/services/mgmt/node/config"
+ "veyron.io/veyron/veyron/services/mgmt/device/config"
"veyron.io/veyron/veyron2/services/mgmt/application"
)
diff --git a/services/mgmt/node/config/const.go b/services/mgmt/device/config/const.go
similarity index 100%
rename from services/mgmt/node/config/const.go
rename to services/mgmt/device/config/const.go
diff --git a/services/mgmt/node/noded/main.go b/services/mgmt/device/deviced/main.go
similarity index 95%
rename from services/mgmt/node/noded/main.go
rename to services/mgmt/device/deviced/main.go
index 624299c..1397a24 100644
--- a/services/mgmt/node/noded/main.go
+++ b/services/mgmt/device/deviced/main.go
@@ -10,8 +10,8 @@
"veyron.io/veyron/veyron/lib/signals"
"veyron.io/veyron/veyron/profiles/roaming"
- "veyron.io/veyron/veyron/services/mgmt/node/config"
- "veyron.io/veyron/veyron/services/mgmt/node/impl"
+ "veyron.io/veyron/veyron/services/mgmt/device/config"
+ "veyron.io/veyron/veyron/services/mgmt/device/impl"
)
var (
diff --git a/services/mgmt/node/doc.go b/services/mgmt/device/doc.go
similarity index 91%
rename from services/mgmt/node/doc.go
rename to services/mgmt/device/doc.go
index 82a4271..5d6b478 100644
--- a/services/mgmt/node/doc.go
+++ b/services/mgmt/device/doc.go
@@ -1,4 +1,4 @@
-// Package node contains the implementation for the veyron2/mgmt/node APIs.
+// Package device contains the implementation for the veyron2/mgmt/device APIs.
//
// The device manager is a server that is expected to run on every
// Veyron-enabled device, and it handles both device management and management
@@ -31,5 +31,5 @@
// The config subpackage encapsulates the configuration settings that form the
// device manager service's 'contract' with its environment.
//
-// The noded subpackage contains the main driver.
-package node
+// The deviced subpackage contains the main driver.
+package device
diff --git a/services/mgmt/node/impl/app_service.go b/services/mgmt/device/impl/app_service.go
similarity index 99%
rename from services/mgmt/node/impl/app_service.go
rename to services/mgmt/device/impl/app_service.go
index ca99029..99312df 100644
--- a/services/mgmt/node/impl/app_service.go
+++ b/services/mgmt/device/impl/app_service.go
@@ -144,9 +144,9 @@
vsecurity "veyron.io/veyron/veyron/security"
"veyron.io/veyron/veyron/security/agent"
"veyron.io/veyron/veyron/security/agent/keymgr"
+ iconfig "veyron.io/veyron/veyron/services/mgmt/device/config"
libbinary "veyron.io/veyron/veyron/services/mgmt/lib/binary"
libpackages "veyron.io/veyron/veyron/services/mgmt/lib/packages"
- iconfig "veyron.io/veyron/veyron/services/mgmt/node/config"
)
// instanceInfo holds state about a running instance.
diff --git a/services/mgmt/node/impl/app_state.go b/services/mgmt/device/impl/app_state.go
similarity index 100%
rename from services/mgmt/node/impl/app_state.go
rename to services/mgmt/device/impl/app_state.go
diff --git a/services/mgmt/node/impl/app_state_test.go b/services/mgmt/device/impl/app_state_test.go
similarity index 100%
rename from services/mgmt/node/impl/app_state_test.go
rename to services/mgmt/device/impl/app_state_test.go
diff --git a/services/mgmt/node/impl/args_darwin_test.go b/services/mgmt/device/impl/args_darwin_test.go
similarity index 100%
rename from services/mgmt/node/impl/args_darwin_test.go
rename to services/mgmt/device/impl/args_darwin_test.go
diff --git a/services/mgmt/node/impl/args_linux_test.go b/services/mgmt/device/impl/args_linux_test.go
similarity index 100%
rename from services/mgmt/node/impl/args_linux_test.go
rename to services/mgmt/device/impl/args_linux_test.go
diff --git a/services/mgmt/node/impl/associate_instance_test.go b/services/mgmt/device/impl/associate_instance_test.go
similarity index 100%
rename from services/mgmt/node/impl/associate_instance_test.go
rename to services/mgmt/device/impl/associate_instance_test.go
diff --git a/services/mgmt/node/impl/association_instance.go b/services/mgmt/device/impl/association_instance.go
similarity index 100%
rename from services/mgmt/node/impl/association_instance.go
rename to services/mgmt/device/impl/association_instance.go
diff --git a/services/mgmt/node/impl/association_state.go b/services/mgmt/device/impl/association_state.go
similarity index 91%
rename from services/mgmt/node/impl/association_state.go
rename to services/mgmt/device/impl/association_state.go
index 9abed47..95412d4 100644
--- a/services/mgmt/node/impl/association_state.go
+++ b/services/mgmt/device/impl/association_state.go
@@ -6,7 +6,7 @@
"path/filepath"
"sync"
- "veyron.io/veyron/veyron2/services/mgmt/node"
+ "veyron.io/veyron/veyron2/services/mgmt/device"
"veyron.io/veyron/veyron2/verror2"
)
@@ -20,7 +20,7 @@
// AllBlessingSystemAssociations returns all of the current Blessing to system
// account associations.
- AllBlessingSystemAssociations() ([]node.Association, error)
+ AllBlessingSystemAssociations() ([]device.Association, error)
// AssociateSystemAccountForBlessings associates the provided systenName with each
// provided blessing.
@@ -51,13 +51,13 @@
return systemName, present
}
-func (u *association) AllBlessingSystemAssociations() ([]node.Association, error) {
+func (u *association) AllBlessingSystemAssociations() ([]device.Association, error) {
u.Lock()
defer u.Unlock()
- assocs := make([]node.Association, 0)
+ assocs := make([]device.Association, 0)
for k, v := range u.data {
- assocs = append(assocs, node.Association{k, v})
+ assocs = append(assocs, device.Association{k, v})
}
return assocs, nil
}
diff --git a/services/mgmt/node/impl/association_state_test.go b/services/mgmt/device/impl/association_state_test.go
similarity index 94%
rename from services/mgmt/node/impl/association_state_test.go
rename to services/mgmt/device/impl/association_state_test.go
index 2d715f1..49054ba 100644
--- a/services/mgmt/node/impl/association_state_test.go
+++ b/services/mgmt/device/impl/association_state_test.go
@@ -7,8 +7,8 @@
"path"
"testing"
- "veyron.io/veyron/veyron/services/mgmt/node/impl"
- "veyron.io/veyron/veyron2/services/mgmt/node"
+ "veyron.io/veyron/veyron/services/mgmt/device/impl"
+ "veyron.io/veyron/veyron2/services/mgmt/device"
)
// TestAssociationPersistance verifies correct operation of association
@@ -35,7 +35,7 @@
t.Fatalf("AllBlessingSystemAssociations failed: %v", err)
}
- compareAssociations(t, got1, []node.Association{
+ compareAssociations(t, got1, []device.Association{
{
"alice",
"alice_account",
@@ -84,7 +84,7 @@
if err != nil {
t.Fatalf("AllBlessingSystemAssociations failed: %v", err)
}
- compareAssociations(t, got1, []node.Association{
+ compareAssociations(t, got1, []device.Association{
{
"alice",
"alice_account",
@@ -100,7 +100,7 @@
if err != nil {
t.Fatalf("AllBlessingSystemAssociations failed: %v", err)
}
- compareAssociations(t, got1, []node.Association{
+ compareAssociations(t, got1, []device.Association{
{
"alice",
"alice_other_account",
diff --git a/services/mgmt/node/impl/callback.go b/services/mgmt/device/impl/callback.go
similarity index 90%
rename from services/mgmt/node/impl/callback.go
rename to services/mgmt/device/impl/callback.go
index 4c93d5c..d7e7c90 100644
--- a/services/mgmt/node/impl/callback.go
+++ b/services/mgmt/device/impl/callback.go
@@ -6,7 +6,7 @@
"veyron.io/veyron/veyron2/vlog"
"veyron.io/veyron/veyron/lib/exec"
- "veyron.io/veyron/veyron/services/mgmt/node"
+ "veyron.io/veyron/veyron/services/mgmt/device"
)
// InvokeCallback provides the parent device manager with the given name (which
@@ -21,7 +21,7 @@
// Device manager was not started by self-update, return silently.
return
}
- nmClient := node.ConfigClient(callbackName)
+ nmClient := device.ConfigClient(callbackName)
ctx, cancel := ctx.WithTimeout(ipcContextTimeout)
defer cancel()
if err := nmClient.Set(ctx, mgmt.ChildNameConfigKey, name); err != nil {
diff --git a/services/mgmt/node/impl/config_service.go b/services/mgmt/device/impl/config_service.go
similarity index 100%
rename from services/mgmt/node/impl/config_service.go
rename to services/mgmt/device/impl/config_service.go
diff --git a/services/mgmt/node/impl/node_installer.go b/services/mgmt/device/impl/device_installer.go
similarity index 97%
rename from services/mgmt/node/impl/node_installer.go
rename to services/mgmt/device/impl/device_installer.go
index c8060c9..b296c4b 100644
--- a/services/mgmt/node/impl/node_installer.go
+++ b/services/mgmt/device/impl/device_installer.go
@@ -11,7 +11,7 @@
"veyron.io/veyron/veyron2/vlog"
// For VeyronEnvironment, see TODO.
- "veyron.io/veyron/veyron/services/mgmt/node/config"
+ "veyron.io/veyron/veyron/services/mgmt/device/config"
)
// InstallFrom takes a veyron object name denoting an application service where
diff --git a/services/mgmt/node/impl/node_service.go b/services/mgmt/device/impl/device_service.go
similarity index 96%
rename from services/mgmt/node/impl/node_service.go
rename to services/mgmt/device/impl/device_service.go
index 7c38b70..b31ceae 100644
--- a/services/mgmt/node/impl/node_service.go
+++ b/services/mgmt/device/impl/device_service.go
@@ -45,14 +45,14 @@
"veyron.io/veyron/veyron2/naming"
"veyron.io/veyron/veyron2/services/mgmt/application"
"veyron.io/veyron/veyron2/services/mgmt/binary"
- "veyron.io/veyron/veyron2/services/mgmt/node"
+ "veyron.io/veyron/veyron2/services/mgmt/device"
"veyron.io/veyron/veyron2/services/security/access"
"veyron.io/veyron/veyron2/verror2"
"veyron.io/veyron/veyron2/vlog"
vexec "veyron.io/veyron/veyron/lib/exec"
"veyron.io/veyron/veyron/lib/netstate"
- "veyron.io/veyron/veyron/services/mgmt/node/config"
+ "veyron.io/veyron/veyron/services/mgmt/device/config"
"veyron.io/veyron/veyron/services/mgmt/profile"
)
@@ -103,8 +103,8 @@
return i.disp.claimDeviceManager(call.LocalPrincipal(), blessings.ForContext(call), blessings)
}
-func (*deviceService) Describe(ipc.ServerContext) (node.Description, error) {
- empty := node.Description{}
+func (*deviceService) Describe(ipc.ServerContext) (device.Description, error) {
+ empty := device.Description{}
deviceProfile, err := computeDeviceProfile()
if err != nil {
return empty, err
@@ -240,7 +240,7 @@
}
// Check that invoking Revert() succeeds.
childName = naming.Join(childName, "nm")
- nmClient := node.DeviceClient(childName)
+ nmClient := device.DeviceClient(childName)
linkOld, pathOld, err := i.getCurrentFileInfo()
if err != nil {
return verror2.Make(ErrOperationFailed, ctx)
@@ -274,7 +274,7 @@
return nil
}
-// TODO(caprita): Move this to util.go since node_installer is also using it now.
+// TODO(caprita): Move this to util.go since device_installer is also using it now.
func generateScript(workspace string, configSettings []string, envelope *application.Envelope) error {
// TODO(caprita): Remove this snippet of code, it doesn't seem to serve
@@ -477,7 +477,7 @@
}
}
-func (i *deviceService) ListAssociations(call ipc.ServerContext) (associations []node.Association, err error) {
+func (i *deviceService) ListAssociations(call ipc.ServerContext) (associations []device.Association, err error) {
// Temporary code. Dump this.
vlog.VI(2).Infof("ListAssociations given blessings: %v\n", call.RemoteBlessings().ForContext(call))
diff --git a/services/mgmt/node/impl/dispatcher.go b/services/mgmt/device/impl/dispatcher.go
similarity index 97%
rename from services/mgmt/node/impl/dispatcher.go
rename to services/mgmt/device/impl/dispatcher.go
index db4e942..2dc4e30 100644
--- a/services/mgmt/node/impl/dispatcher.go
+++ b/services/mgmt/device/impl/dispatcher.go
@@ -16,14 +16,14 @@
"veyron.io/veyron/veyron/security/agent/keymgr"
vflag "veyron.io/veyron/veyron/security/flag"
"veyron.io/veyron/veyron/security/serialization"
+ idevice "veyron.io/veyron/veyron/services/mgmt/device"
+ "veyron.io/veyron/veyron/services/mgmt/device/config"
logsimpl "veyron.io/veyron/veyron/services/mgmt/logreader/impl"
- inode "veyron.io/veyron/veyron/services/mgmt/node"
- "veyron.io/veyron/veyron/services/mgmt/node/config"
"veyron.io/veyron/veyron2/ipc"
"veyron.io/veyron/veyron2/naming"
"veyron.io/veyron/veyron2/security"
- "veyron.io/veyron/veyron2/services/mgmt/node"
+ "veyron.io/veyron/veyron2/services/mgmt/device"
"veyron.io/veyron/veyron2/services/mgmt/pprof"
"veyron.io/veyron/veyron2/services/mgmt/stats"
"veyron.io/veyron/veyron2/services/security/access"
@@ -73,7 +73,7 @@
deviceSuffix = "nm"
configSuffix = "cfg"
- pkgPath = "veyron.io/veyron/veyron/services/mgmt/node/impl"
+ pkgPath = "veyron.io/veyron/veyron/services/mgmt/device/impl"
)
var (
@@ -356,7 +356,7 @@
// prefix.
switch components[0] {
case deviceSuffix:
- receiver := node.DeviceServer(&deviceService{
+ receiver := device.DeviceServer(&deviceService{
callback: d.internal.callback,
updating: d.internal.updating,
config: d.config,
@@ -407,7 +407,7 @@
if err != nil {
return nil, nil, err
}
- receiver := node.ApplicationServer(&appService{
+ receiver := device.ApplicationServer(&appService{
callback: d.internal.callback,
config: d.config,
suffix: components[1:],
@@ -425,7 +425,7 @@
if len(components) != 2 {
return nil, nil, verror2.Make(ErrInvalidSuffix, nil)
}
- receiver := inode.ConfigServer(&configService{
+ receiver := idevice.ConfigServer(&configService{
callback: d.internal.callback,
suffix: components[1],
})
diff --git a/services/mgmt/node/impl/impl_helper_test.go b/services/mgmt/device/impl/impl_helper_test.go
similarity index 95%
rename from services/mgmt/node/impl/impl_helper_test.go
rename to services/mgmt/device/impl/impl_helper_test.go
index 1eaaeda..34b8e9b 100644
--- a/services/mgmt/node/impl/impl_helper_test.go
+++ b/services/mgmt/device/impl/impl_helper_test.go
@@ -9,7 +9,7 @@
"path"
"testing"
- "veyron.io/veyron/veyron/services/mgmt/node/impl"
+ "veyron.io/veyron/veyron/services/mgmt/device/impl"
)
func TestBaseCleanupDir(t *testing.T) {
diff --git a/services/mgmt/node/impl/impl_test.go b/services/mgmt/device/impl/impl_test.go
similarity index 97%
rename from services/mgmt/node/impl/impl_test.go
rename to services/mgmt/device/impl/impl_test.go
index b3387c2..d1f8fe0 100644
--- a/services/mgmt/node/impl/impl_test.go
+++ b/services/mgmt/device/impl/impl_test.go
@@ -34,8 +34,8 @@
"veyron.io/veyron/veyron2/rt"
"veyron.io/veyron/veyron2/security"
"veyron.io/veyron/veyron2/services/mgmt/application"
+ "veyron.io/veyron/veyron2/services/mgmt/device"
"veyron.io/veyron/veyron2/services/mgmt/logreader"
- "veyron.io/veyron/veyron2/services/mgmt/node"
"veyron.io/veyron/veyron2/services/mgmt/pprof"
"veyron.io/veyron/veyron2/services/mgmt/stats"
"veyron.io/veyron/veyron2/services/security/access"
@@ -49,9 +49,9 @@
"veyron.io/veyron/veyron/lib/testutil"
tsecurity "veyron.io/veyron/veyron/lib/testutil/security"
binaryimpl "veyron.io/veyron/veyron/services/mgmt/binary/impl"
+ "veyron.io/veyron/veyron/services/mgmt/device/config"
+ "veyron.io/veyron/veyron/services/mgmt/device/impl"
libbinary "veyron.io/veyron/veyron/services/mgmt/lib/binary"
- "veyron.io/veyron/veyron/services/mgmt/node/config"
- "veyron.io/veyron/veyron/services/mgmt/node/impl"
suidhelper "veyron.io/veyron/veyron/services/mgmt/suidhelper/impl"
)
@@ -282,10 +282,10 @@
// TODO(rjkroege): generateDeviceManagerScript and generateSuidHelperScript have
// code similarity that might benefit from refactoring.
// generateDeviceManagerScript is very similar in behavior to generateScript in
-// node_invoker.go. However, we chose to re-implement it here for two reasons:
-// (1) avoid making generateScript public; and (2) how the test choses to invoke
-// the device manager subprocess the first time should be independent of how
-// device manager implementation sets up its updated versions.
+// device_invoker.go. However, we chose to re-implement it here for two
+// reasons: (1) avoid making generateScript public; and (2) how the test choses
+// to invoke the device manager subprocess the first time should be independent
+// of how device manager implementation sets up its updated versions.
func generateDeviceManagerScript(t *testing.T, root string, args, env []string) string {
env = impl.VeyronEnvironment(env)
output := "#!/bin/bash\n"
@@ -737,7 +737,7 @@
func tryInstall(ctx context.T) error {
appsName := "nm//apps"
- stub := node.ApplicationClient(appsName)
+ stub := device.ApplicationClient(appsName)
if _, err := stub.Install(ctx, mockApplicationRepoName); err != nil {
return fmt.Errorf("Install failed: %v", err)
}
@@ -807,7 +807,7 @@
*envelope = envelopeFromShell(sh, nil, appCmd, "google naps", "trapp")
- deviceStub := node.DeviceClient("nm//nm")
+ deviceStub := device.DeviceClient("nm//nm")
selfRT := globalRT
otherRT := newRuntime(t)
defer otherRT.Cleanup()
@@ -895,7 +895,7 @@
// Create an envelope for an app.
*envelope = envelopeFromShell(sh, nil, appCmd, "google naps")
- deviceStub := node.DeviceClient("nm//nm")
+ deviceStub := device.DeviceClient("nm//nm")
acl, etag, err := deviceStub.GetACL(selfRT.NewContext())
if err != nil {
t.Fatalf("GetACL failed:%v", err)
@@ -1230,7 +1230,7 @@
}
}
-func listAndVerifyAssociations(t *testing.T, stub node.DeviceClientMethods, run veyron2.Runtime, expected []node.Association) {
+func listAndVerifyAssociations(t *testing.T, stub device.DeviceClientMethods, run veyron2.Runtime, expected []device.Association) {
assocs, err := stub.ListAssociations(run.NewContext())
if err != nil {
t.Fatalf("ListAssociations failed %v", err)
@@ -1271,7 +1271,7 @@
pid := readPID(t, nms)
defer syscall.Kill(pid, syscall.SIGINT)
- deviceStub := node.DeviceClient("nm//nm")
+ deviceStub := device.DeviceClient("nm//nm")
// Attempt to list associations on the device manager without having
// claimed it.
@@ -1285,13 +1285,13 @@
}
vlog.VI(2).Info("Verify that associations start out empty.")
- listAndVerifyAssociations(t, deviceStub, selfRT, []node.Association(nil))
+ listAndVerifyAssociations(t, deviceStub, selfRT, []device.Association(nil))
if err := deviceStub.AssociateAccount(selfRT.NewContext(), []string{"root/self", "root/other"}, "alice_system_account"); err != nil {
t.Fatalf("ListAssociations failed %v", err)
}
vlog.VI(2).Info("Added association should appear.")
- listAndVerifyAssociations(t, deviceStub, selfRT, []node.Association{
+ listAndVerifyAssociations(t, deviceStub, selfRT, []device.Association{
{
"root/self",
"alice_system_account",
@@ -1306,7 +1306,7 @@
t.Fatalf("AssociateAccount failed %v", err)
}
vlog.VI(2).Info("Change the associations and the change should appear.")
- listAndVerifyAssociations(t, deviceStub, selfRT, []node.Association{
+ listAndVerifyAssociations(t, deviceStub, selfRT, []device.Association{
{
"root/self",
"alice_other_account",
@@ -1321,7 +1321,7 @@
t.Fatalf("AssociateAccount failed %v", err)
}
vlog.VI(2).Info("Verify that we can remove an association.")
- listAndVerifyAssociations(t, deviceStub, selfRT, []node.Association{
+ listAndVerifyAssociations(t, deviceStub, selfRT, []device.Association{
{
"root/self",
"alice_other_account",
@@ -1379,7 +1379,7 @@
pid := readPID(t, nms)
defer syscall.Kill(pid, syscall.SIGINT)
- deviceStub := node.DeviceClient("nm//nm")
+ deviceStub := device.DeviceClient("nm//nm")
// Create the local server that the app uses to tell us which system
// name the device manager wished to run it as.
diff --git a/services/mgmt/node/impl/mock_repo_test.go b/services/mgmt/device/impl/mock_repo_test.go
similarity index 98%
rename from services/mgmt/node/impl/mock_repo_test.go
rename to services/mgmt/device/impl/mock_repo_test.go
index d55e2c9..0c34ddc 100644
--- a/services/mgmt/node/impl/mock_repo_test.go
+++ b/services/mgmt/device/impl/mock_repo_test.go
@@ -81,7 +81,7 @@
// BINARY REPOSITORY INTERFACE IMPLEMENTATION
// TODO(toddw): Move the errors from dispatcher.go into a common location.
-const pkgPath = "veyron.io/veyron/veyron/services/mgmt/node/impl"
+const pkgPath = "veyron.io/veyron/veyron/services/mgmt/device/impl"
var ErrOperationFailed = verror2.Register(pkgPath+".OperationFailed", verror2.NoRetry, "")
diff --git a/services/mgmt/node/impl/only_for_test.go b/services/mgmt/device/impl/only_for_test.go
similarity index 100%
rename from services/mgmt/node/impl/only_for_test.go
rename to services/mgmt/device/impl/only_for_test.go
diff --git a/services/mgmt/node/impl/profile.go b/services/mgmt/device/impl/profile.go
similarity index 97%
rename from services/mgmt/node/impl/profile.go
rename to services/mgmt/device/impl/profile.go
index 7df74ba..caccde2 100644
--- a/services/mgmt/node/impl/profile.go
+++ b/services/mgmt/device/impl/profile.go
@@ -10,7 +10,7 @@
"veyron.io/veyron/veyron/services/mgmt/profile"
"veyron.io/veyron/veyron2/services/mgmt/build"
- "veyron.io/veyron/veyron2/services/mgmt/node"
+ "veyron.io/veyron/veyron2/services/mgmt/device"
)
// computeDeviceProfile generates a description of the runtime
@@ -166,8 +166,8 @@
// matchProfiles inputs a profile that describes the host device and a
// set of publicly known profiles and outputs a device description that
// identifies the publicly known profiles supported by the host device.
-func matchProfiles(p *profile.Specification, known []profile.Specification) node.Description {
- result := node.Description{Profiles: make(map[string]struct{})}
+func matchProfiles(p *profile.Specification, known []profile.Specification) device.Description {
+ result := device.Description{Profiles: make(map[string]struct{})}
loop:
for _, profile := range known {
if profile.Format != p.Format {
diff --git a/services/mgmt/node/impl/proxy_invoker.go b/services/mgmt/device/impl/proxy_invoker.go
similarity index 100%
rename from services/mgmt/node/impl/proxy_invoker.go
rename to services/mgmt/device/impl/proxy_invoker.go
diff --git a/services/mgmt/node/impl/proxy_invoker_test.go b/services/mgmt/device/impl/proxy_invoker_test.go
similarity index 100%
rename from services/mgmt/node/impl/proxy_invoker_test.go
rename to services/mgmt/device/impl/proxy_invoker_test.go
diff --git a/services/mgmt/node/impl/util.go b/services/mgmt/device/impl/util.go
similarity index 100%
rename from services/mgmt/node/impl/util.go
rename to services/mgmt/device/impl/util.go
diff --git a/services/mgmt/node/impl/util_test.go b/services/mgmt/device/impl/util_test.go
similarity index 96%
rename from services/mgmt/node/impl/util_test.go
rename to services/mgmt/device/impl/util_test.go
index cda76b6..e4d9c7e 100644
--- a/services/mgmt/node/impl/util_test.go
+++ b/services/mgmt/device/impl/util_test.go
@@ -16,7 +16,7 @@
"veyron.io/veyron/veyron2/ipc"
"veyron.io/veyron/veyron2/naming"
"veyron.io/veyron/veyron2/security"
- "veyron.io/veyron/veyron2/services/mgmt/node"
+ "veyron.io/veyron/veyron2/services/mgmt/device"
"veyron.io/veyron/veyron2/verror"
"veyron.io/veyron/veyron2/verror2"
"veyron.io/veyron/veyron2/vlog"
@@ -27,7 +27,7 @@
"veyron.io/veyron/veyron/lib/modules/core"
tsecurity "veyron.io/veyron/veyron/lib/testutil/security"
"veyron.io/veyron/veyron/profiles/static"
- "veyron.io/veyron/veyron/services/mgmt/node/impl"
+ "veyron.io/veyron/veyron/services/mgmt/device/impl"
"veyron.io/veyron/veyron2/services/mgmt/application"
)
@@ -203,9 +203,9 @@
// The following set of functions are convenience wrappers around Update and
// Revert for device manager.
-func deviceStub(name string) node.DeviceClientMethods {
+func deviceStub(name string) device.DeviceClientMethods {
deviceName := naming.Join(name, "nm")
- return node.DeviceClient(deviceName)
+ return device.DeviceClient(deviceName)
}
func updateDeviceExpectError(t *testing.T, name string, errID verror.ID) {
@@ -243,10 +243,10 @@
}
}
-func appStub(nameComponents ...string) node.ApplicationClientMethods {
+func appStub(nameComponents ...string) device.ApplicationClientMethods {
appsName := "nm//apps"
appName := naming.Join(append([]string{appsName}, nameComponents...)...)
- return node.ApplicationClient(appName)
+ return device.ApplicationClient(appName)
}
func installApp(t *testing.T, opt ...veyron2.Runtime) string {
@@ -351,13 +351,13 @@
}
// Code to make Association lists sortable.
-type byIdentity []node.Association
+type byIdentity []device.Association
func (a byIdentity) Len() int { return len(a) }
func (a byIdentity) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func (a byIdentity) Less(i, j int) bool { return a[i].IdentityName < a[j].IdentityName }
-func compareAssociations(t *testing.T, got, expected []node.Association) {
+func compareAssociations(t *testing.T, got, expected []device.Association) {
sort.Sort(byIdentity(got))
sort.Sort(byIdentity(expected))
if !reflect.DeepEqual(got, expected) {
diff --git a/tools/mgmt/nodex/acl_fmt.go b/tools/mgmt/device/acl_fmt.go
similarity index 100%
rename from tools/mgmt/nodex/acl_fmt.go
rename to tools/mgmt/device/acl_fmt.go
diff --git a/tools/mgmt/nodex/acl_impl.go b/tools/mgmt/device/acl_impl.go
similarity index 83%
rename from tools/mgmt/nodex/acl_impl.go
rename to tools/mgmt/device/acl_impl.go
index f54c2ee..f3afeb5 100644
--- a/tools/mgmt/nodex/acl_impl.go
+++ b/tools/mgmt/device/acl_impl.go
@@ -7,7 +7,7 @@
"veyron.io/lib/cmdline"
"veyron.io/veyron/veyron2/security"
- "veyron.io/veyron/veyron2/services/mgmt/node"
+ "veyron.io/veyron/veyron2/services/mgmt/device"
"veyron.io/veyron/veyron2/services/security/access"
verror "veyron.io/veyron/veyron2/verror2"
)
@@ -17,9 +17,9 @@
Name: "get",
Short: "Get ACLs for the given target.",
Long: "Get ACLs for the given target.",
- ArgsName: "<node manager name>",
+ ArgsName: "<device manager name>",
ArgsLong: `
-<node manager name> can be a Vanadium name for a node manager,
+<device manager name> can be a Vanadium name for a device manager,
application installation or instance.`,
}
@@ -29,7 +29,7 @@
}
vanaName := args[0]
- objACL, _, err := node.ApplicationClient(vanaName).GetACL(runtime.NewContext())
+ objACL, _, err := device.ApplicationClient(vanaName).GetACL(runtime.NewContext())
if err != nil {
return fmt.Errorf("GetACL on %s failed: %v", vanaName, err)
}
@@ -52,9 +52,9 @@
Name: "set",
Short: "Set ACLs for the given target.",
Long: "Set ACLs for the given target",
- ArgsName: "<node manager name> (<blessing> [!]<tag>(,[!]<tag>)*",
+ ArgsName: "<device manager name> (<blessing> [!]<tag>(,[!]<tag>)*",
ArgsLong: `
-<node manager name> can be a Vanadium name for a node manager,
+<device manager name> can be a Vanadium name for a device manager,
application installation or instance.
<blessing> is a blessing pattern.
@@ -97,7 +97,7 @@
// Set the ACLs on the specified names.
ctx := runtime.NewContext()
for {
- objACL, etag, err := node.ApplicationClient(vanaName).GetACL(ctx)
+ objACL, etag, err := device.ApplicationClient(vanaName).GetACL(ctx)
if err != nil {
return cmd.UsageErrorf("GetACL(%s) failed: %v", vanaName, err)
}
@@ -111,7 +111,7 @@
}
}
}
- switch err := node.ApplicationClient(vanaName).SetACL(ctx, objACL, etag); {
+ switch err := device.ApplicationClient(vanaName).SetACL(ctx, objACL, etag); {
case err != nil && !verror.Is(err, access.ErrBadEtag):
return cmd.UsageErrorf("SetACL(%s) failed: %v", vanaName, err)
case err == nil:
@@ -125,9 +125,9 @@
func aclRoot() *cmdline.Command {
return &cmdline.Command{
Name: "acl",
- Short: "Tool for setting node manager ACLs",
+ Short: "Tool for setting device manager ACLs",
Long: `
-The acl tool manages ACLs on the node manger, installations and instances.
+The acl tool manages ACLs on the device manger, installations and instances.
`,
Children: []*cmdline.Command{cmdGet, cmdSet},
}
diff --git a/tools/mgmt/nodex/acl_test.go b/tools/mgmt/device/acl_test.go
similarity index 98%
rename from tools/mgmt/nodex/acl_test.go
rename to tools/mgmt/device/acl_test.go
index 9e6b945..ea054ff 100644
--- a/tools/mgmt/nodex/acl_test.go
+++ b/tools/mgmt/device/acl_test.go
@@ -13,7 +13,7 @@
verror "veyron.io/veyron/veyron2/verror2"
)
-const pkgPath = "veyron.io/veyron/veyron/tools/mgmt/nodex/main"
+const pkgPath = "veyron.io/veyron/veyron/tools/mgmt/device/main"
var (
errOops = verror.Register(pkgPath+".errOops", verror.NoRetry, "oops!")
diff --git a/tools/mgmt/nodex/associate_impl.go b/tools/mgmt/device/associate_impl.go
similarity index 90%
rename from tools/mgmt/nodex/associate_impl.go
rename to tools/mgmt/device/associate_impl.go
index 06d77c3..b9900fa 100644
--- a/tools/mgmt/nodex/associate_impl.go
+++ b/tools/mgmt/device/associate_impl.go
@@ -5,7 +5,7 @@
"time"
"veyron.io/lib/cmdline"
- "veyron.io/veyron/veyron2/services/mgmt/node"
+ "veyron.io/veyron/veyron2/services/mgmt/device"
)
var cmdList = &cmdline.Command{
@@ -25,7 +25,7 @@
ctx, cancel := runtime.NewContext().WithTimeout(time.Minute)
defer cancel()
- assocs, err := node.DeviceClient(args[0]).ListAssociations(ctx)
+ assocs, err := device.DeviceClient(args[0]).ListAssociations(ctx)
if err != nil {
return fmt.Errorf("ListAssociations failed: %v", err)
}
@@ -54,7 +54,7 @@
}
ctx, cancel := runtime.NewContext().WithTimeout(time.Minute)
defer cancel()
- return node.DeviceClient(args[0]).AssociateAccount(ctx, args[2:], args[1])
+ return device.DeviceClient(args[0]).AssociateAccount(ctx, args[2:], args[1])
}
var cmdRemove = &cmdline.Command{
@@ -74,7 +74,7 @@
}
ctx, cancel := runtime.NewContext().WithTimeout(time.Minute)
defer cancel()
- return node.DeviceClient(args[0]).AssociateAccount(ctx, args[1:], "")
+ return device.DeviceClient(args[0]).AssociateAccount(ctx, args[1:], "")
}
func associateRoot() *cmdline.Command {
diff --git a/tools/mgmt/nodex/nodemanager_mock_test.go b/tools/mgmt/device/devicemanager_mock_test.go
similarity index 93%
rename from tools/mgmt/nodex/nodemanager_mock_test.go
rename to tools/mgmt/device/devicemanager_mock_test.go
index 717122b..1ba7298 100644
--- a/tools/mgmt/nodex/nodemanager_mock_test.go
+++ b/tools/mgmt/device/devicemanager_mock_test.go
@@ -9,7 +9,7 @@
"veyron.io/veyron/veyron2/naming"
"veyron.io/veyron/veyron2/security"
"veyron.io/veyron/veyron2/services/mgmt/binary"
- "veyron.io/veyron/veyron2/services/mgmt/node"
+ "veyron.io/veyron/veyron2/services/mgmt/device"
"veyron.io/veyron/veyron2/services/security/access"
"veyron.io/veyron/veyron2/vlog"
@@ -23,11 +23,11 @@
// Mock ListAssociations
type ListAssociationResponse struct {
- na []node.Association
+ na []device.Association
err error
}
-func (mni *mockDeviceInvoker) ListAssociations(ipc.ServerContext) (associations []node.Association, err error) {
+func (mni *mockDeviceInvoker) ListAssociations(ipc.ServerContext) (associations []device.Association, err error) {
vlog.VI(2).Infof("ListAssociations() was called")
ir := mni.tape.Record("ListAssociations")
@@ -64,8 +64,8 @@
return mni.simpleCore("Claim", "Claim")
}
-func (*mockDeviceInvoker) Describe(ipc.ServerContext) (node.Description, error) {
- return node.Description{}, nil
+func (*mockDeviceInvoker) Describe(ipc.ServerContext) (device.Description, error) {
+ return device.Description{}, nil
}
func (*mockDeviceInvoker) IsRunnable(_ ipc.ServerContext, description binary.Description) (bool, error) {
return false, nil
@@ -157,7 +157,7 @@
}
func (d *dispatcher) Lookup(suffix string) (interface{}, security.Authorizer, error) {
- return node.DeviceServer(&mockDeviceInvoker{tape: d.tape, t: d.t}), nil, nil
+ return device.DeviceServer(&mockDeviceInvoker{tape: d.tape, t: d.t}), nil, nil
}
func startServer(t *testing.T, r veyron2.Runtime, tape *Tape) (ipc.Server, naming.Endpoint, error) {
diff --git a/tools/mgmt/nodex/doc.go b/tools/mgmt/device/doc.go
similarity index 100%
rename from tools/mgmt/nodex/doc.go
rename to tools/mgmt/device/doc.go
diff --git a/tools/mgmt/nodex/impl.go b/tools/mgmt/device/impl.go
similarity index 86%
rename from tools/mgmt/nodex/impl.go
rename to tools/mgmt/device/impl.go
index 1bda19b..21f4119 100644
--- a/tools/mgmt/nodex/impl.go
+++ b/tools/mgmt/device/impl.go
@@ -7,7 +7,7 @@
"veyron.io/veyron/veyron2/ipc"
"veyron.io/veyron/veyron2/naming"
"veyron.io/veyron/veyron2/security"
- "veyron.io/veyron/veyron2/services/mgmt/node"
+ "veyron.io/veyron/veyron2/services/mgmt/device"
)
var cmdInstall = &cmdline.Command{
@@ -26,7 +26,7 @@
return cmd.UsageErrorf("install: incorrect number of arguments, expected %d, got %d", expected, got)
}
deviceName, appName := args[0], args[1]
- appID, err := node.ApplicationClient(deviceName).Install(runtime.NewContext(), appName)
+ appID, err := device.ApplicationClient(deviceName).Install(runtime.NewContext(), appName)
if err != nil {
return fmt.Errorf("Install failed: %v", err)
}
@@ -63,7 +63,7 @@
return cmd.UsageErrorf("start: incorrect number of arguments, expected %d, got %d", expected, got)
}
appInstallation, grant := args[0], args[1]
- appInstanceIDs, err := node.ApplicationClient(appInstallation).Start(runtime.NewContext(), &granter{p: runtime.Principal(), extension: grant})
+ appInstanceIDs, err := device.ApplicationClient(appInstallation).Start(runtime.NewContext(), &granter{p: runtime.Principal(), extension: grant})
if err != nil {
return fmt.Errorf("Start failed: %v", err)
}
@@ -91,7 +91,7 @@
return cmd.UsageErrorf("claim: incorrect number of arguments, expected %d, got %d", expected, got)
}
deviceName, grant := args[0], args[1]
- if err := node.DeviceClient(deviceName).Claim(runtime.NewContext(), &granter{p: runtime.Principal(), extension: grant}); err != nil {
+ if err := device.DeviceClient(deviceName).Claim(runtime.NewContext(), &granter{p: runtime.Principal(), extension: grant}); err != nil {
return fmt.Errorf("Claim failed: %v", err)
}
fmt.Fprintln(cmd.Stdout(), "Successfully claimed.")
@@ -100,10 +100,10 @@
func root() *cmdline.Command {
return &cmdline.Command{
- Name: "nodex",
+ Name: "device",
Short: "Tool for interacting with the veyron device manager",
Long: `
-The nodex tool facilitates interaction with the veyron device manager.
+The device tool facilitates interaction with the veyron device manager.
`,
Children: []*cmdline.Command{cmdInstall, cmdStart, associateRoot(), cmdClaim, cmdStop, cmdSuspend, cmdResume, aclRoot()},
}
diff --git a/tools/mgmt/nodex/impl_test.go b/tools/mgmt/device/impl_test.go
similarity index 98%
rename from tools/mgmt/nodex/impl_test.go
rename to tools/mgmt/device/impl_test.go
index e7239d3..21128e1 100644
--- a/tools/mgmt/nodex/impl_test.go
+++ b/tools/mgmt/device/impl_test.go
@@ -9,7 +9,7 @@
"veyron.io/veyron/veyron2/naming"
"veyron.io/veyron/veyron2/rt"
- "veyron.io/veyron/veyron2/services/mgmt/node"
+ "veyron.io/veyron/veyron2/services/mgmt/device"
verror "veyron.io/veyron/veyron2/verror2"
)
@@ -36,7 +36,7 @@
// Test the 'list' command.
tape.SetResponses([]interface{}{ListAssociationResponse{
- na: []node.Association{
+ na: []device.Association{
{
"root/self",
"alice_self_account",
diff --git a/tools/mgmt/nodex/instance_impl.go b/tools/mgmt/device/instance_impl.go
similarity index 86%
rename from tools/mgmt/nodex/instance_impl.go
rename to tools/mgmt/device/instance_impl.go
index f419c22..ae50c85 100644
--- a/tools/mgmt/nodex/instance_impl.go
+++ b/tools/mgmt/device/instance_impl.go
@@ -6,7 +6,7 @@
"fmt"
"veyron.io/lib/cmdline"
- "veyron.io/veyron/veyron2/services/mgmt/node"
+ "veyron.io/veyron/veyron2/services/mgmt/device"
)
var cmdStop = &cmdline.Command{
@@ -25,7 +25,7 @@
}
appName := args[0]
- if err := node.ApplicationClient(appName).Stop(runtime.NewContext(), 5); err != nil {
+ if err := device.ApplicationClient(appName).Stop(runtime.NewContext(), 5); err != nil {
return fmt.Errorf("Stop failed: %v", err)
}
fmt.Fprintf(cmd.Stdout(), "Stop succeeded\n")
@@ -48,7 +48,7 @@
}
appName := args[0]
- if err := node.ApplicationClient(appName).Suspend(runtime.NewContext()); err != nil {
+ if err := device.ApplicationClient(appName).Suspend(runtime.NewContext()); err != nil {
return fmt.Errorf("Suspend failed: %v", err)
}
fmt.Fprintf(cmd.Stdout(), "Suspend succeeded\n")
@@ -71,7 +71,7 @@
}
appName := args[0]
- if err := node.ApplicationClient(appName).Resume(runtime.NewContext()); err != nil {
+ if err := device.ApplicationClient(appName).Resume(runtime.NewContext()); err != nil {
return fmt.Errorf("Resume failed: %v", err)
}
fmt.Fprintf(cmd.Stdout(), "Resume succeeded\n")
diff --git a/tools/mgmt/nodex/instance_impl_test.go b/tools/mgmt/device/instance_impl_test.go
similarity index 100%
rename from tools/mgmt/nodex/instance_impl_test.go
rename to tools/mgmt/device/instance_impl_test.go
diff --git a/tools/mgmt/nodex/main.go b/tools/mgmt/device/main.go
similarity index 100%
rename from tools/mgmt/nodex/main.go
rename to tools/mgmt/device/main.go
diff --git a/tools/mgmt/nodex/mock_test.go b/tools/mgmt/device/mock_test.go
similarity index 100%
rename from tools/mgmt/nodex/mock_test.go
rename to tools/mgmt/device/mock_test.go
diff --git a/tools/mgmt/nminstall b/tools/mgmt/nminstall
index c366dbf..bc47887 100755
--- a/tools/mgmt/nminstall
+++ b/tools/mgmt/nminstall
@@ -31,7 +31,7 @@
echo "./nminstall [--single_user] <install parent dir> [<binary source>] [-- args for device manager...]"
}
-readonly BIN_NAMES=(noded suidhelper agentd)
+readonly BIN_NAMES=(deviced suidhelper agentd)
###############################################################################
# Copies one binary from source to destination.
@@ -191,7 +191,7 @@
exit 1
fi
- VEYRON_NM_CURRENT="${INSTALL_DIR}/deviced.curr" VEYRON_NM_ROOT="${NM_ROOT}" VEYRON_NM_HELPER="${SETUID_SCRIPT}" "${BIN_INSTALL}/noded" --install_self -- --name="${PUBLISH}" "$@"
+ VEYRON_NM_CURRENT="${INSTALL_DIR}/deviced.curr" VEYRON_NM_ROOT="${NM_ROOT}" VEYRON_NM_HELPER="${SETUID_SCRIPT}" "${BIN_INSTALL}/deviced" --install_self -- --name="${PUBLISH}" "$@"
echo "Device manager installed."
local -r SECURITY_DIR="${INSTALL_DIR}/security"
diff --git a/tools/mgmt/test.sh b/tools/mgmt/test.sh
index 5cd276f..97d650c 100755
--- a/tools/mgmt/test.sh
+++ b/tools/mgmt/test.sh
@@ -13,8 +13,8 @@
APPLICATION_BIN="$(shell_test::build_go_binary 'veyron.io/veyron/veyron/tools/application')"
AGENTD_BIN="$(shell_test::build_go_binary 'veyron.io/veyron/veyron/security/agent/agentd')"
SUIDHELPER_BIN="$(shell_test::build_go_binary 'veyron.io/veyron/veyron/services/mgmt/suidhelper')"
- DEVICEMANAGER_BIN="$(shell_test::build_go_binary 'veyron.io/veyron/veyron/services/mgmt/node/noded')"
- NODEX_BIN="$(shell_test::build_go_binary 'veyron.io/veyron/veyron/tools/mgmt/nodex')"
+ DEVICEMANAGER_BIN="$(shell_test::build_go_binary 'veyron.io/veyron/veyron/services/mgmt/device/deviced')"
+ DEVICE_BIN="$(shell_test::build_go_binary 'veyron.io/veyron/veyron/tools/mgmt/device')"
NAMESPACE_BIN="$(shell_test::build_go_binary 'veyron.io/veyron/veyron/tools/namespace')"
PRINCIPAL_BIN="$(shell_test::build_go_binary 'veyron.io/veyron/veyron/tools/principal')"
DEBUG_BIN="$(shell_test::build_go_binary 'veyron.io/veyron/veyron/tools/debug')"
@@ -80,7 +80,7 @@
export VEYRON_CREDENTIALS=./alice
# Claim the device as "alice/myworkstation".
- "${NODEX_BIN}" claim "${NM_NAME}/nm" myworkstation
+ "${DEVICE_BIN}" claim "${NM_NAME}/nm" myworkstation
# Verify the device's default blessing is as expected.
shell_test::assert_eq "$("${DEBUG_BIN}" stats read "${NM_NAME}/__debug/stats/security/principal/blessingstore" | head -1 | sed -e 's/^.*Default blessings: '//)" \
@@ -118,14 +118,14 @@
"BINARYD" "${LINENO}"
# Install the app on the device.
- local -r INSTALLATION_NAME=$("${NODEX_BIN}" install "${NM_NAME}/apps" "${SAMPLE_APP_NAME}" | sed -e 's/Successfully installed: "//' | sed -e 's/"//')
+ local -r INSTALLATION_NAME=$("${DEVICE_BIN}" install "${NM_NAME}/apps" "${SAMPLE_APP_NAME}" | sed -e 's/Successfully installed: "//' | sed -e 's/"//')
# Verify that the installation shows up when globbing the device manager.
shell_test::assert_eq "$("${NAMESPACE_BIN}" glob "${NM_NAME}/apps/BINARYD/*")" \
"${INSTALLATION_NAME}" "${LINENO}"
# Start an instance of the app, granting it blessing extension myapp.
- local -r INSTANCE_NAME=$("${NODEX_BIN}" start "${INSTALLATION_NAME}" myapp | sed -e 's/Successfully started: "//' | sed -e 's/"//')
+ local -r INSTANCE_NAME=$("${DEVICE_BIN}" start "${INSTALLATION_NAME}" myapp | sed -e 's/Successfully started: "//' | sed -e 's/"//')
wait_for_mountentry "${NAMESPACE_BIN}" "5" "${APP_PUBLISH_NAME}"
# Verify that the instance shows up when globbing the device manager.
@@ -136,7 +136,7 @@
"alice/myapp/BINARYD" "${LINENO}"
# Stop the instance.
- "${NODEX_BIN}" stop "${INSTANCE_NAME}"
+ "${DEVICE_BIN}" stop "${INSTANCE_NAME}"
# Verify that logs, but not stats, show up when globbing the stopped instance.
shell_test::assert_eq "$("${NAMESPACE_BIN}" glob "${INSTANCE_NAME}/stats/...")" "" "${LINENO}"
diff --git a/tools/vrpc/impl.go b/tools/vrpc/impl.go
index d057082..868a0fe 100644
--- a/tools/vrpc/impl.go
+++ b/tools/vrpc/impl.go
@@ -17,7 +17,7 @@
"veyron.io/veyron/veyron2/wiretype"
idl_binary "veyron.io/veyron/veyron2/services/mgmt/binary"
- idl_node "veyron.io/veyron/veyron2/services/mgmt/node"
+ idl_device "veyron.io/veyron/veyron2/services/mgmt/device"
)
const serverDesc = `
@@ -121,7 +121,7 @@
// empty interface, this will no longer be needed.
var x1 idl_test_base.Struct
vdlutil.Register(x1)
- var x2 idl_node.Description
+ var x2 idl_device.Description
vdlutil.Register(x2)
var x3 idl_binary.Description
vdlutil.Register(x3)