refactor: rename ScadaLink → ZB.MOM.WW.ScadaBridge (code + projects + namespaces)
Solution + 23 src projects + 26 test projects renamed; folders, csproj, namespaces, and ScadaLinkDbContext/ScadaBridgeDbContext class updated. ActorSystem "scadalink" → "scadabridge", Akka seed-node URLs migrated. SQL roles/logins, LDAP domains, CLI command name, and CLI config dir (~/.scadalink → ~/.scadabridge) also renamed. Build green; 5 Host.Tests fail awaiting SQL login rename in next commit. Pre-existing StaleTagMonitor timing flakes unchanged. Rename script committed at tools/rename-to-scadabridge.sh.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Dump design tables from ScadaLinkConfig to a replayable SQL seed file.
|
||||
"""Dump design tables from ScadaBridgeConfig to a replayable SQL seed file.
|
||||
|
||||
Usage:
|
||||
python3 infra/tools/dump_seed.py --output infra/mssql/seed-config.sql
|
||||
@@ -18,7 +18,7 @@ Encrypted secret columns (see ENCRYPTED_COLUMNS) are emitted as NULL: they
|
||||
hold ASP.NET Data Protection ciphertext, which is non-deterministic and bound
|
||||
to the source key ring, so a raw SQL dump can never replay a valid value.
|
||||
Re-populate them through the application after the seed runs (infra/reseed.sh
|
||||
does this via the ScadaLink CLI).
|
||||
does this via the ScadaBridge CLI).
|
||||
"""
|
||||
|
||||
import argparse
|
||||
@@ -31,8 +31,8 @@ import pymssql
|
||||
DEFAULT_HOST = "localhost"
|
||||
DEFAULT_PORT = 1433
|
||||
DEFAULT_USER = "sa"
|
||||
DEFAULT_PASSWORD = "ScadaLink_Dev1#"
|
||||
DEFAULT_DATABASE = "ScadaLinkConfig"
|
||||
DEFAULT_PASSWORD = "ScadaBridge_Dev1#"
|
||||
DEFAULT_DATABASE = "ScadaBridgeConfig"
|
||||
|
||||
INSERT_ORDER = [
|
||||
"TemplateFolders",
|
||||
@@ -52,7 +52,7 @@ INSERT_ORDER = [
|
||||
IDENTITY_TABLES = set(INSERT_ORDER)
|
||||
|
||||
# (table, column) pairs encrypted at rest via ASP.NET Data Protection
|
||||
# (EncryptedStringConverter in ScadaLink.ConfigurationDatabase). Ciphertext is
|
||||
# (EncryptedStringConverter in ZB.MOM.WW.ScadaBridge.ConfigurationDatabase). Ciphertext is
|
||||
# non-deterministic and key-ring-bound, so it cannot be replayed from a static
|
||||
# SQL dump — the application would fail to decrypt it on read. These columns
|
||||
# are dumped as NULL; re-seed their values through the app (CLI / API) so the
|
||||
@@ -118,7 +118,7 @@ def dump(args):
|
||||
cursor = conn.cursor()
|
||||
|
||||
out = []
|
||||
out.append("-- ScadaLink design-data seed.")
|
||||
out.append("-- ScadaBridge design-data seed.")
|
||||
out.append("-- Auto-generated by infra/tools/dump_seed.py against " + args.database + ".")
|
||||
out.append("-- Replays the design-time configuration (templates, scripts,")
|
||||
out.append("-- data connections, external systems). Idempotent: deletes")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""LDAP client tool for ScadaLink test infrastructure."""
|
||||
"""LDAP client tool for ScadaBridge test infrastructure."""
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
@@ -9,10 +9,10 @@ from ldap3 import Server, Connection, NONE, SUBTREE, SIMPLE
|
||||
|
||||
DEFAULT_HOST = "localhost"
|
||||
DEFAULT_PORT = 3893
|
||||
DEFAULT_BASE_DN = "dc=scadalink,dc=local"
|
||||
DEFAULT_BASE_DN = "dc=scadabridge,dc=local"
|
||||
# GLAuth places users under ou=<PrimaryGroupName>,ou=users,dc=...
|
||||
# The admin user (primarygroup SCADA-Admins) needs search capabilities in config.
|
||||
DEFAULT_BIND_DN = "cn=admin,ou=SCADA-Admins,ou=users,dc=scadalink,dc=local"
|
||||
DEFAULT_BIND_DN = "cn=admin,ou=SCADA-Admins,ou=users,dc=scadabridge,dc=local"
|
||||
DEFAULT_BIND_PASSWORD = "password"
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ def cmd_check(args):
|
||||
def cmd_bind(args):
|
||||
"""Test user authentication via bind.
|
||||
|
||||
GLAuth DN format: cn=<user>,ou=<PrimaryGroup>,ou=users,dc=scadalink,dc=local
|
||||
GLAuth DN format: cn=<user>,ou=<PrimaryGroup>,ou=users,dc=scadabridge,dc=local
|
||||
Since we don't know the user's primary group upfront, we search for the user first
|
||||
to discover the full DN, then rebind with that DN.
|
||||
"""
|
||||
@@ -188,7 +188,7 @@ def cmd_groups(args):
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="LDAP client tool for ScadaLink test infrastructure")
|
||||
parser = argparse.ArgumentParser(description="LDAP client tool for ScadaBridge test infrastructure")
|
||||
parser.add_argument("--host", default=DEFAULT_HOST, help=f"LDAP host (default: {DEFAULT_HOST})")
|
||||
parser.add_argument("--port", type=int, default=DEFAULT_PORT, help=f"LDAP port (default: {DEFAULT_PORT})")
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""MS SQL client tool for ScadaLink test infrastructure."""
|
||||
"""MS SQL client tool for ScadaBridge test infrastructure."""
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
@@ -10,8 +10,8 @@ import pymssql
|
||||
DEFAULT_HOST = "localhost"
|
||||
DEFAULT_PORT = 1433
|
||||
DEFAULT_USER = "sa"
|
||||
DEFAULT_PASSWORD = "ScadaLink_Dev1#"
|
||||
EXPECTED_DBS = ["ScadaLinkConfig", "ScadaLinkMachineData"]
|
||||
DEFAULT_PASSWORD = "ScadaBridge_Dev1#"
|
||||
EXPECTED_DBS = ["ScadaBridgeConfig", "ScadaBridgeMachineData"]
|
||||
|
||||
|
||||
def get_connection(args, database=None):
|
||||
@@ -168,7 +168,7 @@ def cmd_tables(args):
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="MS SQL client tool for ScadaLink test infrastructure")
|
||||
parser = argparse.ArgumentParser(description="MS SQL client tool for ScadaBridge test infrastructure")
|
||||
parser.add_argument("--host", default=DEFAULT_HOST, help=f"SQL Server host (default: {DEFAULT_HOST})")
|
||||
parser.add_argument("--port", type=int, default=DEFAULT_PORT, help=f"Port (default: {DEFAULT_PORT})")
|
||||
parser.add_argument("--user", default=DEFAULT_USER, help=f"Username (default: {DEFAULT_USER})")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""OPC UA client tool for ScadaLink test infrastructure."""
|
||||
"""OPC UA client tool for ScadaBridge test infrastructure."""
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
@@ -168,7 +168,7 @@ def cmd_monitor(args):
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="OPC UA client tool for ScadaLink test infrastructure")
|
||||
parser = argparse.ArgumentParser(description="OPC UA client tool for ScadaBridge test infrastructure")
|
||||
parser.add_argument("--endpoint", default=DEFAULT_ENDPOINT, help=f"OPC UA endpoint (default: {DEFAULT_ENDPOINT})")
|
||||
|
||||
sub = parser.add_subparsers(dest="command", required=True)
|
||||
|
||||
@@ -6,7 +6,7 @@ from playwright.sync_api import sync_playwright
|
||||
|
||||
# The browser runs inside Docker, so use the Docker network hostname for Traefik.
|
||||
# The Playwright server WebSocket is exposed to the host on port 3000.
|
||||
TRAEFIK_URL = "http://scadalink-traefik"
|
||||
TRAEFIK_URL = "http://scadabridge-traefik"
|
||||
PLAYWRIGHT_WS = "ws://localhost:3000"
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""REST API client tool for ScadaLink test infrastructure."""
|
||||
"""REST API client tool for ScadaBridge test infrastructure."""
|
||||
|
||||
import argparse
|
||||
import json
|
||||
@@ -9,7 +9,7 @@ import requests
|
||||
|
||||
|
||||
DEFAULT_URL = "http://localhost:5200"
|
||||
DEFAULT_API_KEY = "scadalink-test-key-1"
|
||||
DEFAULT_API_KEY = "scadabridge-test-key-1"
|
||||
|
||||
|
||||
def cmd_check(args):
|
||||
@@ -122,7 +122,7 @@ def cmd_methods(args):
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="REST API client tool for ScadaLink test infrastructure")
|
||||
parser = argparse.ArgumentParser(description="REST API client tool for ScadaBridge test infrastructure")
|
||||
parser.add_argument("--url", default=DEFAULT_URL, help=f"API base URL (default: {DEFAULT_URL})")
|
||||
parser.add_argument("--api-key", default=DEFAULT_API_KEY, help=f"API key (default: {DEFAULT_API_KEY})")
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env python3
|
||||
"""SMTP/Mailpit client tool for ScadaLink test infrastructure."""
|
||||
"""SMTP/Mailpit client tool for ScadaBridge test infrastructure."""
|
||||
|
||||
import argparse
|
||||
import email.mime.text
|
||||
@@ -147,7 +147,7 @@ def cmd_clear(args):
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description="SMTP/Mailpit client tool for ScadaLink test infrastructure")
|
||||
parser = argparse.ArgumentParser(description="SMTP/Mailpit client tool for ScadaBridge test infrastructure")
|
||||
parser.add_argument("--host", default=DEFAULT_SMTP_HOST, help=f"SMTP host (default: {DEFAULT_SMTP_HOST})")
|
||||
parser.add_argument("--port", type=int, default=DEFAULT_SMTP_PORT, help=f"SMTP port (default: {DEFAULT_SMTP_PORT})")
|
||||
parser.add_argument("--api", default=DEFAULT_API_URL, help=f"Mailpit API URL (default: {DEFAULT_API_URL})")
|
||||
@@ -162,7 +162,7 @@ def main():
|
||||
send_p.add_argument("--to", required=True, help="Recipient address")
|
||||
send_p.add_argument("--bcc", help="Comma-separated BCC addresses")
|
||||
send_p.add_argument("--subject", default="Test notification", help="Subject line")
|
||||
send_p.add_argument("--body", default="This is a test notification from ScadaLink.", help="Message body")
|
||||
send_p.add_argument("--body", default="This is a test notification from ZB.MOM.WW.ScadaBridge.", help="Message body")
|
||||
|
||||
list_p = sub.add_parser("list", help="List messages in Mailpit inbox")
|
||||
list_p.add_argument("--limit", type=int, default=20, help="Number of messages to show (default: 20)")
|
||||
|
||||
Reference in New Issue
Block a user