Luca Prete | 4259b99 | 2018-05-04 10:02:03 -0700 | [diff] [blame] | 1 | # Copyright 2017-present Open Networking Foundation |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | # curl -H "xos-username: admin@opencord.org" -H "xos-password: letmein" -X POST --data-binary @vrouter.yaml http://192.168.99.100:30007/run |
| 16 | |
| 17 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 18 | imports: |
| 19 | - custom_types/vrouterserviceinstance.yaml |
| 20 | - custom_types/vrouterstaticroute.yaml |
| 21 | description: Creates a vrouter and pushes a static route |
| 22 | topology_template: |
| 23 | node_templates: |
| 24 | vrouter#my_vrouter: |
| 25 | type: tosca.nodes.VRouterServiceInstance |
| 26 | properties: |
| 27 | name: my_vrouter |
| 28 | |
| 29 | # Add a static route to the vRouter |
| 30 | route#my_route: |
| 31 | type: tosca.nodes.VRouterStaticRoute |
| 32 | properties: |
| 33 | prefix: "0.0.0.0/0" |
| 34 | next_hop: "192.168.0.254" |
| 35 | requirements: |
| 36 | - vrouter: |
| 37 | node: vrouter#my_vrouter |
| 38 | relationship: tosca.relationships.BelongsToOne |