x/ref: Move v.io/v23/mgmt to v.io/x/ref/lib/mgmt
Also add package doc.
MultiPart: 2/2
Change-Id: If918e6e239cefc25a636081ae67d1ff3174f6642
diff --git a/lib/mgmt/model.go b/lib/mgmt/model.go
new file mode 100644
index 0000000..e49b5c9
--- /dev/null
+++ b/lib/mgmt/model.go
@@ -0,0 +1,17 @@
+// Copyright 2015 The Vanadium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Package mgmt defines constants used by the management tools and daemons.
+package mgmt
+
+const (
+ ParentNameConfigKey = "MGMT_PARENT_PROCESS_NAME"
+ ChildNameConfigKey = "MGMT_CHILD_PROCESS_NAME"
+ AppCycleManagerConfigKey = "MGMT_APP_CYCLE_MANAGER_NAME"
+ AddressConfigKey = "MGMT_CHILD_PROCESS_ADDRESS"
+ ProtocolConfigKey = "MGMT_CHILD_PROCESS_PROTOCOL"
+ ParentBlessingConfigKey = "MGMT_PARENT_BLESSING_PEER_PATTERN"
+ SecurityAgentFDConfigKey = "MGMT_SECURITY_AGENT_FD"
+ AppOriginConfigKey = "MGMT_APP_ORIGIN"
+)
diff --git a/lib/signals/signals_test.go b/lib/signals/signals_test.go
index 82d5958..1df20e1 100644
--- a/lib/signals/signals_test.go
+++ b/lib/signals/signals_test.go
@@ -16,12 +16,12 @@
"v.io/v23"
"v.io/v23/context"
- "v.io/v23/mgmt"
"v.io/v23/naming"
"v.io/v23/rpc"
"v.io/v23/services/appcycle"
"v.io/v23/vtrace"
+ "v.io/x/ref/lib/mgmt"
_ "v.io/x/ref/profiles"
vflag "v.io/x/ref/security/flag"
"v.io/x/ref/services/mgmt/device"
diff --git a/profiles/internal/rt/mgmt.go b/profiles/internal/rt/mgmt.go
index 6033e93..13412c1 100644
--- a/profiles/internal/rt/mgmt.go
+++ b/profiles/internal/rt/mgmt.go
@@ -9,13 +9,13 @@
"v.io/v23"
"v.io/v23/context"
- "v.io/v23/mgmt"
"v.io/v23/naming"
"v.io/v23/options"
"v.io/v23/rpc"
"v.io/v23/verror"
"v.io/x/ref/lib/exec"
+ "v.io/x/ref/lib/mgmt"
)
const pkgPath = "v.io/x/ref/option/internal/rt"
diff --git a/profiles/internal/rt/mgmt_test.go b/profiles/internal/rt/mgmt_test.go
index 55f8321..4b2fabf 100644
--- a/profiles/internal/rt/mgmt_test.go
+++ b/profiles/internal/rt/mgmt_test.go
@@ -15,11 +15,11 @@
"v.io/v23"
"v.io/v23/context"
- "v.io/v23/mgmt"
"v.io/v23/naming"
"v.io/v23/rpc"
"v.io/v23/services/appcycle"
+ "v.io/x/ref/lib/mgmt"
_ "v.io/x/ref/profiles"
vflag "v.io/x/ref/security/flag"
"v.io/x/ref/services/mgmt/device"
diff --git a/profiles/internal/rt/security.go b/profiles/internal/rt/security.go
index d565d77..faf0661 100644
--- a/profiles/internal/rt/security.go
+++ b/profiles/internal/rt/security.go
@@ -12,12 +12,12 @@
"syscall"
"v.io/v23/context"
- "v.io/v23/mgmt"
"v.io/v23/rpc"
"v.io/v23/security"
"v.io/v23/verror"
"v.io/x/ref/lib/exec"
+ "v.io/x/ref/lib/mgmt"
vsecurity "v.io/x/ref/security"
"v.io/x/ref/security/agent"
)
diff --git a/services/mgmt/device/deviced/server.go b/services/mgmt/device/deviced/server.go
index 681da90..9279f00 100644
--- a/services/mgmt/device/deviced/server.go
+++ b/services/mgmt/device/deviced/server.go
@@ -17,6 +17,7 @@
"v.io/x/lib/cmdline"
vexec "v.io/x/ref/lib/exec"
+ "v.io/x/ref/lib/mgmt"
"v.io/x/ref/lib/signals"
_ "v.io/x/ref/profiles/roaming"
"v.io/x/ref/services/mgmt/device/config"
@@ -24,7 +25,6 @@
"v.io/v23"
"v.io/v23/context"
- "v.io/v23/mgmt"
"v.io/v23/rpc"
"v.io/v23/verror"
"v.io/x/lib/vlog"
diff --git a/services/mgmt/device/impl/app_service.go b/services/mgmt/device/impl/app_service.go
index 6d94a0f..3952e1e 100644
--- a/services/mgmt/device/impl/app_service.go
+++ b/services/mgmt/device/impl/app_service.go
@@ -140,7 +140,6 @@
"v.io/v23"
"v.io/v23/context"
- "v.io/v23/mgmt"
"v.io/v23/naming"
"v.io/v23/rpc"
"v.io/v23/security"
@@ -153,6 +152,7 @@
"v.io/x/ref/envvar"
vexec "v.io/x/ref/lib/exec"
+ "v.io/x/ref/lib/mgmt"
vsecurity "v.io/x/ref/security"
"v.io/x/ref/security/agent"
"v.io/x/ref/security/agent/keymgr"
diff --git a/services/mgmt/device/impl/callback.go b/services/mgmt/device/impl/callback.go
index 4241e60..e48bc86 100644
--- a/services/mgmt/device/impl/callback.go
+++ b/services/mgmt/device/impl/callback.go
@@ -6,11 +6,11 @@
import (
"v.io/v23/context"
- "v.io/v23/mgmt"
"v.io/v23/verror"
"v.io/x/lib/vlog"
"v.io/x/ref/lib/exec"
+ "v.io/x/ref/lib/mgmt"
"v.io/x/ref/services/mgmt/device"
)
diff --git a/services/mgmt/device/impl/device_service.go b/services/mgmt/device/impl/device_service.go
index d4a78c9..510f17c 100644
--- a/services/mgmt/device/impl/device_service.go
+++ b/services/mgmt/device/impl/device_service.go
@@ -53,7 +53,6 @@
"v.io/v23"
"v.io/v23/context"
- "v.io/v23/mgmt"
"v.io/v23/naming"
"v.io/v23/rpc"
"v.io/v23/security"
@@ -67,6 +66,7 @@
"v.io/x/ref/envvar"
vexec "v.io/x/ref/lib/exec"
+ "v.io/x/ref/lib/mgmt"
vsecurity "v.io/x/ref/security"
"v.io/x/ref/services/mgmt/device/config"
"v.io/x/ref/services/profile"
diff --git a/services/mgmt/device/impl/impl_test.go b/services/mgmt/device/impl/impl_test.go
index d155a1d..987de1a 100644
--- a/services/mgmt/device/impl/impl_test.go
+++ b/services/mgmt/device/impl/impl_test.go
@@ -33,7 +33,6 @@
"v.io/v23"
"v.io/v23/context"
- "v.io/v23/mgmt"
"v.io/v23/naming"
"v.io/v23/rpc"
"v.io/v23/security"
@@ -44,6 +43,7 @@
"v.io/v23/verror"
"v.io/x/ref/envvar"
+ "v.io/x/ref/lib/mgmt"
"v.io/x/ref/lib/signals"
binaryimpl "v.io/x/ref/services/mgmt/binary/impl"
"v.io/x/ref/services/mgmt/device/config"
diff --git a/test/modules/exec.go b/test/modules/exec.go
index 35c34e6..66ff2b6 100644
--- a/test/modules/exec.go
+++ b/test/modules/exec.go
@@ -14,10 +14,10 @@
"sync"
"time"
- "v.io/v23/mgmt"
"v.io/v23/verror"
"v.io/x/lib/vlog"
vexec "v.io/x/ref/lib/exec"
+ "v.io/x/ref/lib/mgmt"
"v.io/x/ref/test/expect"
)