{
- "service-function-forwarders": {
- "service-function-forwarder": [
- {
- "name": "SFF-bootstrap",
- "sff-data-plane-locator": {
- "port": 33333,
- "ip": "10.3.1.101"
- },
- "transport": "service-function-forwarder:vxlan-gpe",
- "service-function-dictionary": [
- {
- "name": "dpi-102-3",
- "type": "dpi",
- "service-function-forwarder": "SFF-bootstrap",
- "sf-data-plane-locator": {
- "port": 10003,
- "ip": "10.3.1.102"
- }
- },
- {
- "name": "napt44-104",
- "type": "napt44",
- "service-function-forwarder": "SFF-bootstrap",
- "sf-data-plane-locator": {
- "port": 10020,
- "ip": "10.3.1.104"
- }
- },
- {
- "name": "firewall-101-1",
- "type": "firewall",
- "service-function-forwarder": "SFF-bootstrap",
- "sf-data-plane-locator": {
- "port": 10001,
- "ip": "10.3.1.101"
- }
- },
- {
- "name": "napt44-103-2",
- "type": "napt44",
- "service-function-forwarder": "SFF-bootstrap",
- "sf-data-plane-locator": {
- "port": 10002,
- "ip": "10.3.1.103"
- }
- },
- {
- "name": "napt44-103-1",
- "type": "napt44",
- "service-function-forwarder": "SFF-bootstrap",
- "sf-data-plane-locator": {
- "port": 10001,
- "ip": "10.3.1.103"
- }
- },
- {
- "name": "firewall-101-2",
- "type": "firewall",
- "service-function-forwarder": "SFF-bootstrap",
- "sf-data-plane-locator": {
- "port": 10002,
- "ip": "10.3.1.101"
- }
- },
- {
- "name": "firewall-104",
- "type": "firewall",
- "service-function-forwarder": "SFF-bootstrap",
- "sf-data-plane-locator": {
- "port": 10001,
- "ip": "10.3.1.104"
- }
- },
- {
- "name": "dpi-102-1",
- "type": "dpi",
- "service-function-forwarder": "SFF-bootstrap",
- "sf-data-plane-locator": {
- "port": 10001,
- "ip": "10.3.1.102"
- }
- },
- {
- "name": "dpi-102-2",
- "type": "dpi",
- "service-function-forwarder": "SFF-bootstrap",
- "sf-data-plane-locator": {
- "port": 10002,
- "ip": "10.3.1.102"
- }
- }
- ]
+ "service-function-forwarders": {
+ "service-function-forwarder": [
+ {
+ "name": "br-int-ovs-1",
+ "uuid": "4c3778e4-840d-47f4-b45e-0988e514d26c",
+ "service-node": "OVSDB1",
+ "sff-data-plane-locator": [
+ {
+ "name": "eth0",
+ "data-plane-locator": {
+ "port": 5000,
+ "ip": "192.168.1.1"
+ },
+ "transport": "vxlan-gpe"
+ }
+ ],
+ "service-function-dictionary": [
+ {
+ "sf-data-plane-locator": {
+ "port": 5000,
+ "ip": "10.1.1.1"
+ },
+ "name": "SF1",
+ "service-function-forwarder": "br-int-ovs-1",
+ "type": "dp1"
+ },
+ {
+ "sf-data-plane-locator": {
+ "port": 5000,
+ "ip": "10.1.1.2"
+ },
+ "name": "SF2",
+ "service-function-forwarder": "br-int-ovs-1",
+ "type": "firewall"
+ }
+ ]
+ },
+ {
+ "name": "br-int-ovs-2",
+ "uuid": "fd4d849f-5140-48cd-bc60-6ad1f5fc0a02",
+ "service-node": "OVSDB2",
+ "sff-data-plane-locator": [
+ {
+ "name": "eth0",
+ "data-plane-locator": {
+ "port": 5000,
+ "ip": "192.168.1.2"
}
+ }
+ ],
+ "service-function-dictionary": [
+ {
+ "sf-data-plane-locator": {
+ "port": 5000,
+ "ip": "10.1.1.5"
+ },
+ "name": "SF5",
+ "service-function-forwarder": "br-int-ovs-2",
+ "type": "qos"
+ },
+ {
+ "sf-data-plane-locator": {
+ "port": 5000,
+ "ip": "10.1.1.6"
+ },
+ "name": "SF6",
+ "service-function-forwarder": "br-int-ovs-2",
+ "type": "napt44"
+ }
]
- }
+ }
+ ]
+ }
}
\ No newline at end of file
{
- "bootstrap": {
- "bootstrapDataDir": "configuration/startup/bootstrap/",
- "configDataUrl": "http://localhost:8080/restconf/config/",
- "configDataMimeType": "application/json",
- "files": [
- {"name": "service-function-forwarders.json", "urlpath": "service-function-forwarder:service-function-forwarders"},
- {"name": "service-functions.json", "urlpath": "service-function:service-functions"},
- {"name": "service-function-chains.json", "urlpath": "service-function-chain:service-function-chains"},
- {"name": "service-nodes.json", "urlpath": "service-node:service-nodes"}
- ]
- }
+ "bootstrap": {
+ "bootstrapDataDir": "configuration/startup/bootstrap/",
+ "configDataUrl": "http://localhost:8080/restconf/config/",
+ "configDataMimeType": "application/json",
+ "files": [
+ {
+ "name": "service-function-forwarders.json",
+ "urlpath": "service-function-forwarder:service-function-forwarders"
+ },
+ {
+ "name": "service-functions.json",
+ "urlpath": "service-function:service-functions"
+ },
+ {
+ "name": "service-function-chains.json",
+ "urlpath": "service-function-chain:service-function-chains"
+ },
+ {
+ "name": "service-nodes.json",
+ "urlpath": "service-node:service-nodes"
+ }
+ ]
+ }
}
grouping service-function-chain-grouping {
list service-function-chain {
description
- "A service Function chain defines an
- abstract set of service functions and their ordering
- constraints that must be applied to packets and/or frames
- selected as a result of classification. The implied order
- may not be a linear progression as the architecture allows
- for nodes that copy to more than one branch, and also allows
- for cases where there is flexibility in the order in which
- services need to be applied. The term service chain is often
- used as shorthand for service function chain.";
+ "A list that holds all service function chains in the
+ domain";
key "name";
leaf name {
type string;
description
"the name of the service function chain";
}
+ leaf symmetric {
+ type boolean;
+ description
+ "If the chain is symmetric we will create two service
+ paths, one ingress and another egress. Packets traverse
+ the egress service path in the reverse order of the
+ ingress path";
+ }
list sfc-service-function {
key "name";
leaf name {
type string;
description
- "The name of the service function if known,
- otherwise a generic unique string";
+ "A unique handle that describes the service function
+ that will be chosen for this type, such as
+ ingress-dpi. This is not the service function name";
}
leaf type {
type string;
mandatory true;
description
- "Service Function Type from service-function-type.yang.";
+ "Service Function Type from service-function-type.yang";
}
ordered-by user;
description
container service-function-chains {
uses service-function-chain-grouping;
description
- "This containers holds service function chains configuration
- data";
+ "A service Function chain defines an
+ abstract set of service functions and their ordering
+ constraints that must be applied to packets and/or frames
+ selected as a result of classification. The implied order
+ may not be a linear progression as the architecture allows
+ for nodes that copy to more than one branch, and also allows
+ for cases where there is flexibility in the order in which
+ services need to be applied. The term service chain is often
+ used as shorthand for service function chain.";
}
container service-function-chains-state {
module service-function-forwarder-ovs {
yang-version 1;
- namespace "urn:cisco:params:xml:ns:yang:sfc-acl";
+ namespace "urn:cisco:params:xml:ns:yang:sfc-sff-ovs";
prefix sfc-sff-ovs;
description "Augmentation of SFF for OVS";
}
- augment "/sfc-sff:service-function-forwarders/sfc-sff:service-function-forwarder/" {
+ augment "/sfc-sff:service-function-forwarders/"
+ + "sfc-sff:service-function-forwarder/" {
description "OVSDB bridge UUID";
leaf uuid {
type string;
container service-function-forwarders {
+ description
+ "A service function forwarder is
+ responsible for delivering traffic received from the SFC
+ network forwarder to one or more connected service
+ functions via information carried in the SFC encapsulation.
+ ";
list service-function-forwarder {
+ description
+ "A list that holds configuration of all SFFs in the domain";
key "name";
leaf name {
type string;
description
"A list of all Service Functions attached to this SFF.";
}
- description
- "A service function forwarder is
- responsible for delivering traffic received from the SFC
- network forwarder to one or more connected service
- functions via information carried in the SFC encapsulation.
- ";
}
- description
- "This container holds the configuration for all service
- function forwarders";
}
}
// Service Function Path
container service-function-paths {
+ description
+ "The SFP provides a level of indirection
+ between the fully abstract notion of service chain as an
+ abstract sequence of functions to be delivered, and the
+ fully specified notion of exactly what SFF/SFs the packet
+ will visit when it actually traverses the network. By
+ allowing the control components to specify the use of this
+ level of indirection, the deployment may choose the degree
+ of SFF/SF selection authority that is delegated to the
+ network";
list service-function-path {
+ description
+ "A list that holds configuration data for all SFPs in the
+ domain";
key "name";
leaf name {
type string;
}
ordered-by user;
description
- "A list of service function instances that compose the
+ "A list of service functions that compose the
service path";
}
leaf service-chain-name {
value for reporting and troubleshooting packets along
a specific path.";
}
- description
- "The SFP provides a level of indirection
- between the fully abstract notion of service chain as an
- abstract sequence of functions to be delivered, and the
- fully specified notion of exactly what SFF/SFs the packet
- will visit when it actually traverses the network. By
- allowing the control components to specify the use of this
- level of indirection, the deployment may choose the degree
- of SFF/SF selection authority that is delegated to the
- network";
}
- description
- "This container holds all service-paths in the domain";
}
}
"The list of all service functions of a specific type";
}
description
- "A list of all service types. Each service-type entry holds a
- list of all service functions of the type";
+ "A list of all service types. Each service-type entry holds
+ a list of all service functions of the type";
}
}
}
typedef service-function-ref {
type leafref {
- path "/sfc-sf:service-functions/sfc-sf:service-function/sfc-sf:name";
+ path "/sfc-sf:service-functions/sfc-sf:service-function/"
+ + "sfc-sf:name";
}
description
"This type is used by data models that need to reference
<artifactId>jackson-module-jaxb-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.glassfish</groupId>
+ <artifactId>javax.json</artifactId>
+ <version>1.0.4</version>
+ </dependency>
</dependencies>
<build>
if (dataProvider != null) {
final AsyncReadWriteTransaction t = dataProvider.newReadWriteTransaction();
- t.delete(LogicalDatastoreType.OPERATIONAL, sfEntryIID);
- t.delete(LogicalDatastoreType.OPERATIONAL, sfEntryIID);
- t.delete(LogicalDatastoreType.OPERATIONAL, sfEntryIID);
- t.delete(LogicalDatastoreType.OPERATIONAL, sfcEntryIID);
- t.delete(LogicalDatastoreType.OPERATIONAL, sfsIID);
- t.delete(LogicalDatastoreType.OPERATIONAL, snIID);
- t.delete(LogicalDatastoreType.OPERATIONAL, sffIID);
- t.delete(LogicalDatastoreType.OPERATIONAL, sfpIID);
- t.delete(LogicalDatastoreType.OPERATIONAL, sftIID);
+ t.delete(LogicalDatastoreType.CONFIGURATION, sfEntryIID);
+ t.delete(LogicalDatastoreType.CONFIGURATION, sfEntryIID);
+ t.delete(LogicalDatastoreType.CONFIGURATION, sfEntryIID);
+ t.delete(LogicalDatastoreType.CONFIGURATION, sfcEntryIID);
+ t.delete(LogicalDatastoreType.CONFIGURATION, sfsIID);
+ t.delete(LogicalDatastoreType.CONFIGURATION, snIID);
+ t.delete(LogicalDatastoreType.CONFIGURATION, sffIID);
+ t.delete(LogicalDatastoreType.CONFIGURATION, sfpIID);
+ t.delete(LogicalDatastoreType.CONFIGURATION, sftIID);
t.commit().get();
}
}
odlSfc.executor.execute(SfcProviderServiceTypeAPI
.getDeleteServiceFunctionFromServiceType(serviceTypeObj, serviceTypeClass));
- Object[] sfParams = {originalServiceFunction};
- Class[] sfParamsTypes = {ServiceFunction.class};
- odlSfc.executor.execute(SfcProviderServiceForwarderAPI
- .getDeleteServiceFunctionFromForwarder(sfParams, sfParamsTypes ));
+ //Object[] sfParams = {originalServiceFunction};
+ //Class[] sfParamsTypes = {ServiceFunction.class};
+ //odlSfc.executor.execute(SfcProviderServiceForwarderAPI
+ // .getDeleteServiceFunctionFromForwarder(sfParams, sfParamsTypes ));
Object[] functionParams = {originalServiceFunction};
Class[] functionParamsTypes = {ServiceFunction.class};
odlSfc.executor.execute(SfcProviderServiceTypeAPI
.getCreateServiceFunctionToServiceType(serviceTypeObj, serviceTypeClass));
- Object[] sfParams = {createdServiceFunction};
- Class[] sfParamsTypes = {ServiceFunction.class};
+ //Object[] sfParams = {createdServiceFunction};
+ //Class[] sfParamsTypes = {ServiceFunction.class};
//odlSfc.executor.execute(SfcProviderServiceForwarderAPI
// .getCreateServiceForwarderAPI(sfParams, sfParamsTypes));
LOG.debug("\n########## getCreatedConfigurationData {} {}",
Object[] sfParams = {updatedServiceFunction};
Class[] sfParamsTypes = {ServiceFunction.class};
- odlSfc.executor.execute(SfcProviderServiceForwarderAPI
- .getUpdateServiceForwarderAPI(sfParams, sfParamsTypes ));
+ //odlSfc.executor.execute(SfcProviderServiceForwarderAPI
+ // .getUpdateServiceForwarderAPI(sfParams, sfParamsTypes ));
odlSfc.executor.execute(SfcProviderServicePathAPI
.getUpdateServicePathContainingFunction(sfParams, sfParamsTypes));
}
}
- // SFC CREATION
+ // SFP CREATION
Map<InstanceIdentifier<?>, DataObject> dataCreatedObject = change.getCreatedData();
for (Map.Entry<InstanceIdentifier<?>, DataObject> entry : dataCreatedObject.entrySet())
public void onDataChanged(
final AsyncDataChangeEvent<InstanceIdentifier<?>, DataObject> change ) {
- LOG.info("\n########## Start: {}", Thread.currentThread().getStackTrace()[1]);
+ LOG.debug("\n########## Start: {}", Thread.currentThread().getStackTrace()[1]);
- LOG.info("\n########## Stop: {}", Thread.currentThread().getStackTrace()[1]);
+ LOG.debug("\n########## Stop: {}", Thread.currentThread().getStackTrace()[1]);
}
}
JSONObject jo = providerConfig.getJsonBootstrapObject();
- JSONArray files = new JSONArray();
+ JSONArray files;
try {
final String CONFIG_FILES_DIR = jo.getString("bootstrapDataDir");
final String CONFIG_DATA_MIME_TYPE = jo.getString("configDataMimeType");
files = jo.getJSONArray("files");
+
ClientConfig clientConfig = new DefaultClientConfig();
Client client = Client.create(clientConfig);