fabric-testbed / InformationModel

FABRIC Information Model library
MIT License
7 stars 1 forks source link

Addressed adding network service types, their constraints and constraint checking #46

Closed ibaldin closed 3 years ago

ibaldin commented 3 years ago

Modified test code etc. Addresses #38

ibaldin commented 3 years ago

Sorry, this isn't quite ready - I need to finish one bit with EROs (Explicit Route Objects).

ibaldin commented 3 years ago

With deepest apologies, I believe this is ready for review. Sorry for the huge size again. The main change is that SwitchFabric (sliver, class, type) is gone. Replaced with NetworkService whcih can take many types: P4, OVS, MPLS, L2PTP, L2Bridge, L2STS etc. It can be attached to components (P4, OVS types) or nodes (MPLS type for switches) or be by itself and provide connectivity service between interfaces. It is used slightly differently depending on whether it is used in an experiment topology (ASM) or in a substrate topology (ARM).

In ASM you use it as you used Link class before - create nodes with components, if components are NICs, interfaces are automatically created and you can create a NetworkService class, give it a name, type and a list of node interfaces and it will get created. Importantly, unlike Link class, in this case NetworkService will have its own ServicePort type interfaces that are automatically linked via Link nodes to the compute node interfaces passed to it.

For substrate topologies (ARMs) you use it like you used SwitchFabric before - create it, attach interfaces (ports) to it and manually link them to server interfaces - the only thing that changed is in the definition of a DP switch. Instead of

dp_sf = switch.add_switch_fabric(name=switch.name+'-sf',
                                           node_id=switch.node_id + '-sf',
                                           stitch_node=True)

it now looks like this

dp_ns = switch.add_network_service(name=switch.name+'-ns',
                                           node_id=switch.node_id + '-ns',
                                           nstype=f.ServiceType.MPLS,
                                           stitch_node=True)
kthare10 commented 3 years ago

Please update the version for attrs==20.3.0 to match fabric-fss-utils and readme-renderer==0.27 and Pygments==2.9.0

ibaldin commented 3 years ago

Done @kthare10

ibaldin commented 3 years ago

PyPi 0.49

kthare10 commented 3 years ago

Apologize for multiple requests but following versions are still different between fss-utils and fim. Please include these too. I have compared both this should be all. attrs==20.3.0 iniconfig==1.1.1 readme-renderer==29.0 toml==0.10.2

ibaldin commented 3 years ago

PyPi 0.50

xi-yang commented 3 years ago

Looks this will fix the issue I commented in the fimutil pull request. https://github.com/fabric-testbed/information-model-utils/pull/7#issuecomment-854853290

If @kthare10 is ok with it, go ahead to merge.