Package generated_from_step3body_json { Import all from HTTP.MessageBased Type String Type TODO_RESOLVE_REFERENCED Use "step3body.json" as SOURCE_MAPPING Type JSON_String Structure JSON extends Body ( optional Services services ) Collection Services of Service Structure Service ( JSON_String ^name, JSON_String adminStatus, Ports ports ) JSON_String p1 JSON_String p2 JSON_String p3 JSON_String p4 JSON_String node1 JSON_String node2 //Option 1: Map to concrete values that shall be substituted using data-mappings //Import different mappings or resolve dynamically? Use "companysettings" as Settings Map p1 to "companySettings.svc['access-port1'][ 'a-link-aggr-id']" in Settings as P1_Map Map p2 to "companySettings.svc['access-port2'][ 'i-d-link-W-id']" in Settings as P1_Map //... //Option 2: Use substitution inline with paths //Option 3: Apply functions to transform / substitute some parts //To which extent is that needed? is it dynamic or statically initialised at start? //-> Defer to adaptation? expose only necessary parts? Collection Ports of Port Structure Port ( JSON_String accessNodeId, JSON_String accessLtpId, JSON_String tagType, JSON_String vlanValue, JSON_String bwprofile ) //Just use mappings? or replace with variables? (if dynamic) JSON JSON_instance ( services = [ ( ^name = 'S1-local', adminStatus = 'up', ports = [ (accessNodeId = node1, accessLtpId = p1, tagType = 's-vlan', vlanValue = '201'), (accessNodeId = node2, accessLtpId = p3, tagType = 'c-vlan', vlanValue = '101', bwprofile = true) ] ), ( ^name = 'S2-local-1', adminStatus = 'up', ports = [ (accessNodeId = node1, accessLtpId = p1, tagType = 's-vlan', vlanValue = '202'), (accessNodeId = node2, accessLtpId = p2, tagType = 's-vlan', vlanValue = '202') ] ), ( ^name = 'S3-local-1', adminStatus = 'up', ports = [ (accessNodeId = node1, accessLtpId = p1, tagType = 's-vlan', vlanValue = '203'), (accessNodeId = node2, accessLtpId = p4, tagType = 's-vlan', vlanValue = '203') ] ), ( ^name = 'S1-inter-d-1', adminStatus = 'up', ports = [ (accessNodeId = node1, accessLtpId = p1, tagType = 's-vlan', vlanValue = '204'), (accessNodeId = node2, accessLtpId = p2, tagType = 's-vlan', vlanValue = '204') ] ), ( ^name = 'S2-inter-d-1', adminStatus = 'up', ports = [ (accessNodeId = node1, accessLtpId = p1, tagType = 's-vlan', vlanValue = '205'), (accessNodeId = node2, accessLtpId = p2, tagType = 's-vlan', vlanValue = '205') ] ), ( ^name = 'S3-inter-d-1', adminStatus = 'up', ports = [ (accessNodeId = node1, accessLtpId = p1, tagType = 's-vlan', vlanValue = '206'), (accessNodeId = node2, accessLtpId = p4, tagType = 's-vlan', vlanValue = '206') ] ), ( ^name = 'S4-inter-d-1', adminStatus = 'up', ports = [ (accessNodeId = node1, accessLtpId = p1, tagType = 's-vlan', vlanValue = '207'), (accessNodeId = node2, accessLtpId = p4, tagType = 's-vlan', vlanValue = '207') ] ), ( ^name = 'S1-leaf-2', adminStatus = 'up', ports = [ (accessNodeId = node2, accessLtpId = p2, tagType = 's-vlan', vlanValue = '208'), (accessNodeId = node2, accessLtpId = p4, tagType = 's-vlan', vlanValue = '208') ] ), ( ^name = 'S2-leaf-2', adminStatus = 'up', ports = [ (accessNodeId = node2, accessLtpId = p2, tagType = 's-vlan', vlanValue = '209'), (accessNodeId = node2, accessLtpId = p3, tagType = 'c-vlan', vlanValue = '103', bwprofile = true) ] ), ( ^name = 'S3-leaf-1', adminStatus = 'up', ports = [ (accessNodeId = node2, accessLtpId = p3, tagType = 'c-vlan', vlanValue = '104', bwprofile = true), (accessNodeId = node2, accessLtpId = p4, tagType = 's-vlan', vlanValue = '210') ] ) ] ) }