forked from opsmill/infrahub-demo-dc-fabric
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.infrahub.yml
99 lines (82 loc) · 2.79 KB
/
.infrahub.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
---
jinja2_transforms:
- name: "device_cisco"
description: "Template to generate startup configuration for Cisco devices"
query: "device_info"
template_path: "templates/device_cisco_config.tpl.j2"
- name: "device_arista"
description: "Template to generate startup configuration for Arista devices"
query: "device_info"
template_path: "templates/device_arista_config.tpl.j2"
- name: "firewall_config"
description: "Template to generate startup configuration for a Juniper SRX Firewall"
query: "juniper_srx_config"
template_path: "templates/juniper_srx_config.j2"
- name: "clab_topology"
query: "topology_info"
template_path: "topology/clab_topology.j2"
artifact_definitions:
- name: "Openconfig Interface for Arista devices"
artifact_name: "openconfig-interfaces"
parameters:
device: "name__value"
content_type: "application/json"
targets: "arista_devices"
transformation: "OCInterfaces"
- name: "Startup Config for Cisco devices"
artifact_name: "startup-config"
parameters:
device: "name__value"
content_type: "text/plain"
targets: "cisco_devices"
transformation: "device_cisco"
- name: "Startup Config for Arista devices"
artifact_name: "startup-config"
parameters:
device: "name__value"
content_type: "text/plain"
targets: "arista_devices"
transformation: "device_arista"
- name: "Firewall config"
artifact_name: "firewall-config"
parameters:
device: "name__value"
content_type: "text/plain"
targets: "firewall_devices"
transformation: "firewall_config"
- name: "Containerlab Topology"
artifact_name: "containerlab-topology"
parameters:
topology_name: "name__value"
content_type: "text/plain"
targets: "all_topologies"
transformation: "clab_topology"
check_definitions:
- name: "check_device_topology"
class_name: "InfrahubCheckDeviceTopology"
file_path: "checks/check_device_topology.py"
python_transforms:
- name: OCInterfaces
class_name: OCInterfaces
file_path: "transforms/openconfig.py"
generator_definitions:
- name: generate_network_services
file_path: "generators/network_services.py"
targets: network_services
query: generate_network_services
class_name: NetworkServicesGenerator
parameters:
network_service_name: "name__value"
queries:
- name: topology_info
file_path: "topology/topology_info.gql"
- name: juniper_srx_config
file_path: "templates/juniper_srx_config.gql"
- name: device_info
file_path: "templates/device_info.gql"
- name: oc_interfaces
file_path: "transforms/oc_interfaces.gql"
- name: check_device_topology
file_path: "checks/check_device_topology.gql"
- name: generate_network_services
file_path: "generators/network_services.gql"