Skip to content

Commit b9ee3de

Browse files
chore(xtest): rename lmgmt to otdf-local
- Rename package from lmgmt to otdf-local - Rename Python module from lmgmt to otdf_local (PEP 8) - Update CLI command to otdf-local - Update environment variable prefix: LMGMT_* → OTDF_LOCAL_* - Update all imports and documentation - Preserve git history with git mv BREAKING CHANGE: Command changed from 'lmgmt' to 'otdf-local' Environment variables now use OTDF_LOCAL_ prefix instead of LMGMT_ Update uv.lock Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
1 parent e84da68 commit b9ee3de

39 files changed

Lines changed: 248 additions & 234 deletions

AGENTS.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ otdf-sdk-mgr install tip go # Build from source
2626

2727
```bash
2828
# Configure environment for pytest (recommended)
29-
cd tests/lmgmt
30-
eval $(uv run lmgmt env)
29+
cd tests/otdf-local
30+
eval $(uv run otdf-local env)
3131
cd ../xtest
3232

3333
# Run with specific SDK
@@ -96,7 +96,7 @@ Use `lmgmt` for all environment management (starting/stopping services, viewing
9696
- `lmgmt/README.md` - command reference and installation
9797
- `lmgmt/CLAUDE.md` - operational procedures (restarts, tmux navigation, golden key config, troubleshooting)
9898

99-
Quick start: `cd tests/lmgmt && uv run lmgmt up`
99+
Quick start: `cd tests/otdf-local && uv run otdf-local up`
100100

101101
## Key Concepts
102102

@@ -131,7 +131,7 @@ yq e -i ".services.kas.root_key = \"$PLATFORM_ROOT_KEY\"" "$CONFIG_FILE"
131131
```bash
132132
yq e -i '.services.kas.preview.ec_tdf_enabled = true' platform/opentdf.yaml
133133
yq e -i '.services.kas.preview.ec_tdf_enabled = true' platform/opentdf-dev.yaml
134-
cd tests/lmgmt && uv run lmgmt restart platform
134+
cd tests/otdf-local && uv run otdf-local restart platform
135135
```
136136

137137
### ABAC Test Failures: Decrypt Errors
@@ -155,9 +155,9 @@ curl http://localhost:8080/api/kas/v2/kas/key-access-servers | jq '.key_access_s
155155
**Root Cause**: Golden TDFs require specific keys loaded by the platform. `lmgmt up` auto-configures these. See `lmgmt/CLAUDE.md` for manual configuration details.
156156

157157
```bash
158-
cd tests/lmgmt
159-
uv run lmgmt up # or restart platform
160-
eval $(uv run lmgmt env)
158+
cd tests/otdf-local
159+
uv run otdf-local up # or restart platform
160+
eval $(uv run otdf-local env)
161161
cd ../xtest
162162
uv run pytest test_legacy.py --sdks go -v --no-audit-logs
163163
```
@@ -182,7 +182,7 @@ export SCHEMA_FILE=/path/to/schema.json
182182
curl http://localhost:8080/api/kas/v2/kas/key-access-servers | jq
183183
curl http://localhost:8080/healthz
184184
```
185-
4. **Check service logs**: `cd tests/lmgmt && uv run lmgmt logs --grep "error" -f`
185+
4. **Check service logs**: `cd tests/otdf-local && uv run otdf-local logs --grep "error" -f`
186186
5. **Manual reproduction**:
187187
```bash
188188
sdk/go/dist/main/cli.sh encrypt test.txt test.tdf --attr https://example.com/attr/foo/value/bar
@@ -206,7 +206,7 @@ After changes to SDK source, rebuild with `otdf-sdk-mgr install tip go` (or java
206206
### When Modifying Platform Code
207207

208208
```bash
209-
cd tests/lmgmt && uv run lmgmt restart platform
209+
cd tests/otdf-local && uv run otdf-local restart platform
210210
```
211211

212212
### When Modifying Test Code
@@ -259,10 +259,10 @@ See `otdf-sdk-mgr/README.md` for full command reference.
259259
### Preferred Workflow
260260

261261
1. **Configure SDK artifacts**: `cd tests/otdf-sdk-mgr && otdf-sdk-mgr install stable`
262-
2. **Start environment**: `cd tests/lmgmt && uv run lmgmt up`
263-
3. **Configure shell**: `eval $(uv run lmgmt env)`
262+
2. **Start environment**: `cd tests/otdf-local && uv run otdf-local up`
263+
3. **Configure shell**: `eval $(uv run otdf-local env)`
264264
4. **Run tests**: `cd ../xtest && uv run pytest --sdks go -v`
265-
5. **Restart after config changes**: `cd ../lmgmt && uv run lmgmt restart <service>`
265+
5. **Restart after config changes**: `cd ../lmgmt && uv run otdf-local restart <service>`
266266

267267
### When Debugging Test Failures
268268

lmgmt/src/lmgmt/__init__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

lmgmt/src/lmgmt/__main__.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

lmgmt/src/lmgmt/config/__init__.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

lmgmt/src/lmgmt/health/__init__.py

Lines changed: 0 additions & 6 deletions
This file was deleted.

lmgmt/src/lmgmt/process/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

lmgmt/src/lmgmt/services/__init__.py

Lines changed: 0 additions & 23 deletions
This file was deleted.

lmgmt/src/lmgmt/utils/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

lmgmt/tests/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

lmgmt/CLAUDE.md renamed to otdf-local/CLAUDE.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
1-
# lmgmt - Agent Operational Guide
1+
# otdf-local - Agent Operational Guide
22

3-
This guide covers operational procedures for managing the test environment with `lmgmt`. For command reference, see [README.md](README.md).
3+
This guide covers operational procedures for managing the test environment with `otdf-local`. For command reference, see [README.md](README.md).
44

55
## Environment Setup for pytest
66

77
```bash
8-
cd tests/lmgmt
9-
eval $(uv run lmgmt env) # Sets PLATFORM_LOG_FILE, KAS_*_LOG_FILE, etc.
10-
uv run lmgmt env --format json # Output as JSON
8+
cd tests/otdf-local
9+
eval $(uv run otdf-local env) # Sets PLATFORM_LOG_FILE, KAS_*_LOG_FILE, etc.
10+
uv run otdf-local env --format json # Output as JSON
1111
cd ../xtest
1212
uv run pytest --sdks go -v
1313
```
1414

1515
## Service Ports
1616

17-
Auto-configured by lmgmt:
17+
Auto-configured by otdf-local:
1818
- Keycloak: 8888, Postgres: 5432, Platform: 8080
1919
- KAS: alpha=8181, beta=8282, gamma=8383, delta=8484, km1=8585, km2=8686
2020

2121
## Restart Procedures
2222

2323
### Full Environment Restart
2424
```bash
25-
cd tests/lmgmt
25+
cd tests/otdf-local
2626

27-
uv run lmgmt down
28-
uv run lmgmt up
27+
uv run otdf-local down
28+
uv run otdf-local up
2929

3030
# Or with cleanup
31-
uv run lmgmt down --clean
32-
uv run lmgmt up
31+
uv run otdf-local down --clean
32+
uv run otdf-local up
3333
```
3434

3535
### Service-Specific Restart
3636
```bash
37-
cd tests/lmgmt
37+
cd tests/otdf-local
3838

39-
uv run lmgmt restart platform
40-
uv run lmgmt restart kas-alpha
41-
uv run lmgmt restart kas-km1
42-
uv run lmgmt restart docker
39+
uv run otdf-local restart platform
40+
uv run otdf-local restart kas-alpha
41+
uv run otdf-local restart kas-km1
42+
uv run otdf-local restart docker
4343
```
4444

4545
### Manual Restart (Emergency)
4646

47-
Only use when lmgmt itself is broken or unresponsive:
47+
Only use when otdf-local itself is broken or unresponsive:
4848

4949
```bash
5050
pkill -9 -f "go.*service.*start"
5151
pkill -9 -f "opentdf-kas"
5252
tmux kill-session -t xtest 2>/dev/null || true
5353
cd platform && docker compose down 2>/dev/null || true
5454
sleep 5
55-
cd tests/lmgmt && uv run lmgmt up
55+
cd tests/otdf-local && uv run otdf-local up
5656
```
5757

5858
### Platform Only (Manual)
@@ -77,11 +77,11 @@ tmux attach -t xtest
7777

7878
## Viewing Service Logs
7979

80-
**Via lmgmt:**
80+
**Via otdf-local:**
8181
```bash
82-
uv run lmgmt logs -f # Follow all
83-
uv run lmgmt logs platform -f # Follow specific service
84-
uv run lmgmt logs --grep "error" -f # Filter
82+
uv run otdf-local logs -f # Follow all
83+
uv run otdf-local logs platform -f # Follow specific service
84+
uv run otdf-local logs --grep "error" -f # Filter
8585
```
8686

8787
**Via tmux session:**
@@ -110,13 +110,13 @@ tail -f tests/xtest/logs/kas-km1.log
110110
111111
## Golden Key Auto-Configuration
112112
113-
When using `lmgmt up` or `lmgmt restart platform`, golden keys are automatically configured:
114-
1. `lmgmt` reads `tests/xtest/extra-keys.json` containing the `golden-r1` key
113+
When using `otdf-local up` or `otdf-local restart platform`, golden keys are automatically configured:
114+
1. `otdf-local` reads `tests/xtest/extra-keys.json` containing the `golden-r1` key
115115
2. Key files are extracted to `platform/golden-r1-private.pem` and `platform/golden-r1-cert.pem`
116116
3. The key is added to `cryptoProvider.standard.keys` in the platform config
117117
4. A legacy keyring entry is added to `services.kas.keyring`
118118
119-
**Manual configuration** (if not using lmgmt):
119+
**Manual configuration** (if not using otdf-local):
120120
121121
Add to `platform/opentdf-dev.yaml`:
122122
```yaml
@@ -145,16 +145,16 @@ jq -r '.[0].cert' tests/xtest/extra-keys.json > platform/golden-r1-cert.pem
145145
## Troubleshooting
146146
147147
```bash
148-
cd tests/lmgmt
148+
cd tests/otdf-local
149149

150150
# Check service status
151-
uv run lmgmt status
152-
uv run lmgmt ls --all
151+
uv run otdf-local status
152+
uv run otdf-local ls --all
153153

154154
# View service logs
155-
uv run lmgmt logs platform -f
156-
uv run lmgmt logs kas-alpha -f
157-
uv run lmgmt logs --grep error
155+
uv run otdf-local logs platform -f
156+
uv run otdf-local logs kas-alpha -f
157+
uv run otdf-local logs --grep error
158158

159159
# Or check log files directly
160160
tail -f tests/xtest/logs/platform.log
@@ -169,18 +169,18 @@ lsof -i :8181 # KAS alpha
169169
lsof -i :8888 # Keycloak
170170
```
171171
172-
## Extending lmgmt
172+
## Extending otdf-local
173173
174174
The shell scripts in `scripts/lib/` are deprecated. For new automation:
175-
- Extend the `lmgmt` Python CLI instead of creating new shell scripts
175+
- Extend the `otdf-local` Python CLI instead of creating new shell scripts
176176
- The codebase uses Python with Pydantic for type safety and better error handling
177177
- See `README.md` for project structure
178178
179179
To test changes:
180180
```bash
181-
cd tests/lmgmt
182-
uv run lmgmt down
183-
uv run lmgmt up
184-
uv run lmgmt status
185-
uv run lmgmt logs -f
181+
cd tests/otdf-local
182+
uv run otdf-local down
183+
uv run otdf-local up
184+
uv run otdf-local status
185+
uv run otdf-local logs -f
186186
```

0 commit comments

Comments
 (0)