Scheduled maintenance on Saturday, 27 September 2025, from 07:00 AM to 4:00 PM GMT (09:00 AM to 6:00 PM CEST) - some services may be unavailable -

Skip to content
Snippets Groups Projects
Select Git revision
  • a268a8c842c6d5c7d3a609f0a19ac62732c39bdc
  • master default
  • feat/320-cttc-ietf-simap-basic-support-with-kafka-yang-push
  • feat/307-update-python-version-service
  • feat/292-cttc-implement-integration-test-for-ryu-openflow
  • cnit_tapi
  • feat/314-tid-new-service-for-ipowdm-configuration-fron-orchestrator-to-ipowdm-controller
  • feat/327-tid-new-service-to-ipowdm-controller-to-manage-transceivers-configuration-on-external-agent
  • cnit-p2mp-premerge
  • feat/325-tid-nbi-e2e-to-manage-e2e-path-computation
  • feat/326-tid-external-management-of-devices-telemetry-nbi
  • openroadm-flex-grid
  • feat/310-cttc-implement-nbi-connector-to-interface-with-osm-client
  • develop protected
  • feat/324-tid-nbi-ietf_l3vpn-deploy-fail
  • feat/321-add-support-for-gnmi-configuration-via-proto
  • feat/322-add-read-support-for-ipinfusion-devices-via-netconf
  • feat/323-add-support-for-restconf-protocol-in-devices
  • feat/policy-refactor
  • feat/192-cttc-implement-telemetry-backend-collector-gnmi-openconfig
  • feat/307-update-python-version
  • feat/telemetry-collector-int
  • v5.0.0 protected
  • v4.0.0 protected
  • demo-dpiab-eucnc2024
  • v3.0.0 protected
  • v2.1.0 protected
  • v2.0.0 protected
  • v1.0.0 protected
29 results

report_coverage_all.sh

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    Populate.py 1.55 KiB
    import copy
    from context.client.ContextClient import ContextClient
    from context.proto.context_pb2 import Context, Device, Link, Service, Topology
    from context.tests.example_objects import (
        CONTEXT, TOPOLOGY,
        DEVICE1, DEVICE1_ID, DEVICE2, DEVICE2_ID, DEVICE3, DEVICE3_ID,
        LINK_DEV1_DEV2, LINK_DEV1_DEV2_ID, LINK_DEV1_DEV3, LINK_DEV1_DEV3_ID, LINK_DEV2_DEV3, LINK_DEV2_DEV3_ID,
        SERVICE_DEV1_DEV2, SERVICE_DEV1_DEV3, SERVICE_DEV2_DEV3)
    
    def populate(address, port):
        client = ContextClient(address=address, port=port)
    
        client.SetContext(Context(**CONTEXT))
        client.SetTopology(Topology(**TOPOLOGY))
        client.SetDevice(Device(**DEVICE1))
        client.SetDevice(Device(**DEVICE2))
        client.SetDevice(Device(**DEVICE3))
    
        client.SetLink(Link(**LINK_DEV1_DEV2))
        client.SetLink(Link(**LINK_DEV1_DEV3))
        client.SetLink(Link(**LINK_DEV2_DEV3))
    
        TOPOLOGY_WITH_DEVICES_AND_LINKS = copy.deepcopy(TOPOLOGY)
        TOPOLOGY_WITH_DEVICES_AND_LINKS['device_ids'].append(DEVICE1_ID)
        TOPOLOGY_WITH_DEVICES_AND_LINKS['device_ids'].append(DEVICE2_ID)
        TOPOLOGY_WITH_DEVICES_AND_LINKS['device_ids'].append(DEVICE3_ID)
        TOPOLOGY_WITH_DEVICES_AND_LINKS['link_ids'].append(LINK_DEV1_DEV2_ID)
        TOPOLOGY_WITH_DEVICES_AND_LINKS['link_ids'].append(LINK_DEV1_DEV3_ID)
        TOPOLOGY_WITH_DEVICES_AND_LINKS['link_ids'].append(LINK_DEV2_DEV3_ID)
        client.SetTopology(Topology(**TOPOLOGY_WITH_DEVICES_AND_LINKS))
    
        client.SetService(Service(**SERVICE_DEV1_DEV2))
        client.SetService(Service(**SERVICE_DEV1_DEV3))
        client.SetService(Service(**SERVICE_DEV2_DEV3))