Technical Documentation

Example: JUNOS SDK Service Set Configuration

In the following configuration example, the acme-svc1 service is defined by three rules (their content is unspecified) and the acme-svc2 service is defined by a rule set made up of an unspecified number of rules. In this example, these services are defined at the [edit acme services] hierarchy level.

[edit]acme {services {acme-svc1 { #Provider-defined servicesvc1-rule1 { # First rule’s name. . . # First rule defined}svc1-rule2 { # Second rule’s name. . . # Second rule defined}svc1-rule3 { # Third rule’s name. . . # Third rule defined}}acme-svc2 { # Provider-defined servicerule-set svc2-rule-set { # Rule-set name[ rules rule-names ]; # Rules definitions start here}}}}

At the [edit services] hierarchy level (no intervening “acme” level here), the service-set sset1 is defined by referencing the three rule names for acme-svc1 and the one rule set name for acme-svc2 using the service-set service-set-name extension-service statement at the [edit services service-set service-set-name] hierarchy level.

The service order is also configured at the [edit services service-set service-set-name] hierarchy level.

The following is an example of configuring service sets, extension service rules, and the service order:

[edit]services {service-set sset1 {extension-service acme-svc1 {svc1-rule1;svc1-rule2;svc1-rule3;}extension-service acme-svc2 {rule-set svc2-rule-set;}/* Now define the order */service-order {forward-flow [acme-svc1 acme-svc2];reverse-flow [acme-svc1 acme-svc2];}}}

Published: 2010-05-09