You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up to #2192 (foundation) and PR #2193 (pytest + Zuul CI). Once the test infrastructure has landed, actual unit test coverage has to be added module by module. This meta issue tracks the overall rollout plan so nothing gets lost and links all sub-issues.
Approach: start with pure-logic modules (fast feedback, no mocking), then move to mock-heavy helpers, tasks, services, API, and commands. Each sub-issue is self-contained and reviewable on its own.
Background
Follow-up to #2192 (foundation) and PR #2193 (pytest + Zuul CI). Once the test infrastructure has landed, actual unit test coverage has to be added module by module. This meta issue tracks the overall rollout plan so nothing gets lost and links all sub-issues.
Approach: start with pure-logic modules (fast feedback, no mocking), then move to mock-heavy helpers, tasks, services, API, and commands. Each sub-issue is self-contained and reviewable on its own.
Progress
Tier 1 — Pure logic (quick wins)
osism/utils/inventory.pyosism/data/enums.pyosism/data/playbooks.pyosism/settings.pyosism/tasks/conductor/sonic/{constants,bgp}.pyTier 2 — Conductor helpers (pure logic + lightweight NetBox stubs)
osism/tasks/conductor/utils.py—deep_compare,deep_merge,deep_decrypt,_is_secret_key,load_yaml_fileosism/tasks/conductor/sonic/cache.py—InterfaceCache(thread-lock, hit/miss)osism/tasks/conductor/sonic/device.py—get_device_platform,get_device_hostname,get_device_mac_addressosism/tasks/conductor/sonic/connections.py—find_interconnected_devicesand helpersosism/tasks/conductor/config.py+osism/tasks/conductor/netbox.py—get_configuration,get_nb_device_query_list_*,get_device_oob_ipTier 3 — Conductor core (large modules, may split)
osism/tasks/conductor/sonic/interface.py(1.079 LOC)osism/tasks/conductor/sonic/config_generator.py(2.201 LOC — likely two issues: base config + port/BGP/VLAN parts)osism/tasks/conductor/sonic/{sync,exporter}.pyosism/tasks/conductor/{ironic,redfish}.pyTier 4 — Utils package
osism/utils/__init__.py— Redis/NetBox/OpenStack clients, redlock, task-lock, task-output publisherosism/utils/ssh.py—ensure_known_hosts_file,get_host_identifiers,cleanup_ssh_known_hosts_for_nodeosism/utils/rabbitmq.py—get_rabbitmq_node_addresses, subprocess mocksTier 5 — Tasks (non-conductor)
osism/tasks/__init__.py—Config,get_container_version,run_ansible_in_environment,run_command, host-pattern parsingosism/tasks/{ansible,ceph,kolla,kubernetes,reconciler}.py— thin task wrappers (combined issue)osism/tasks/netbox.pyosism/tasks/openstack.pyTier 6 — Services
osism/services/{websocket_manager,event_bridge}.py—EventMessage, filters, Redis bridgeosism/services/listener.py—BaremetalEventsstate machine, exchange handlingTier 7 — API
osism/api.py— utility functions + Pydantic models + inventory-secret maskingosism/api.py— endpoints (HTTP + WebSocket) via FastAPITestClientTier 8 — Commands (CLI)
osism/main.py+ entry point (OsismApp)task,worker,reconciler,lock,service,container,configuration,set,nosetapply,check,validate,wait,compose,sync,get,log,consolebaremetal,redfish,server,stresscompute,volume,manage,migrate,status,report,vault,amphora,octavia,loadbalancernetbox,sonicConventions for sub-issues
file:linereferencespython-osism-unit-testsjob is green,flake8/mypy/python-blackremain greenOut of scope here
pytest-testinfrascenarios remain untouched)