feat: v0 — glpi-go client, mglpi CLI, mglpi-mcp, fake-GLPI test suite [#767]

https://projects.knownelement.com/issues/767#note-4191
This commit is contained in:
2026-09-04 08:41:25 -05:00
commit 5da1eee08f
26 changed files with 4956 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
// Command fakeglpi boots the in-memory fake GLPI on a fixed address for
// the smoke run (see smoke/smoke.sh), with a few demo CIs seeded and an
// optional agent-profile gate. The real CMDB is never contacted.
package main
import (
"flag"
"log"
"os"
"git.knownelement.com/ukrrs/mopac-glpi-go/internal/fakeglpi"
)
func main() {
addr := flag.String("addr", ":8602", "listen address")
requireProfile := flag.Int("require-change-profile", 0, "reject change creation unless this profile is active (agent-mode gate)")
flag.Parse()
app := os.Getenv("FAKE_APP_TOKEN")
if app == "" {
app = "smoke-app-token-0123456789"
}
user := os.Getenv("FAKE_USER_TOKEN")
if user == "" {
user = "smoke-user-token-0123456789"
}
log.Printf("fakeglpi listening on %s", *addr)
log.Fatal(fakeglpi.ListenAndServe(*addr, app, user, *requireProfile))
}