{
    "title": "fabric info",
    "$schema": "http://json-schema.org/draft-06/schema#",
    "type": "object",
    "additionalProperties": false,
    "required": [
        "fabric_fq_name",
        "management_subnets",
        "device_auth",
        "node_profiles"
    ],
    "properties": {
        "fabric_fq_name": {
            "type": "array",
            "items": {
                "type": "string"
            }
        },
        "fabric_display_name": {
            "type": "string"
        },
        "management_subnets": {
            "type": "array",
            "items": {
                "type": "object",
                "description": "List of the management network subnets for the fabric",
                "additionalProperties": false,
                "required": [
                    "cidr"
                ],
                "properties": {
                    "cidr": {
                        "type": "string",
                        "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}(/([0-9]|[1-2][0-9]|3[0-2]))?$"
                    },
                    "gateway": {
                        "type": "string",
                        "format": "ipv4"
                    }
                }
            }
        },
        "loopback_subnets": {
            "type": "array",
            "items": {
                "type": "string",
                "description": "List of the subnet prefixes that fabric device loopback ips can be allocated.",
                "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}(/([0-9]|[1-2][0-9]|3[0-2]))?$"
            }
        },
        "fabric_subnets": {
            "type": "array",
            "items": {
                "type": "string",
                "description": "List of the subnet prefixes that could be carved out for the p2p networks between fabric devices.",
                "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}(/([0-9]|[1-2][0-9]|3[0-2]))?$"
            }
        },
        "pnf_servicechain_subnets": {
            "type": "array",
            "items": {
                "type": "string",
                "description": "List of the subnet prefixes that could be carved out for service chaining between fabric devices.",
                "pattern": "^([0-9]{1,3}\\.){3}[0-9]{1,3}(/([0-9]|[1-2][0-9]|3[0-2]))?$"
            }
        },
        "fabric_asn_pool": {
            "type": "array",
            "items": {
                "title": "eBGP ASN Pool for fabric underlay network",
                "type": "object",
                "description": "List of the ASN pools that could be used to configure the eBGP peers for the IP fabric",
                "properties": {
                    "asn_min": {
                        "type": "integer"
                    },
                    "asn_max": {
                        "type": "integer"
                    }
                },
                "required": [
                    "asn_min",
                    "asn_max"
                ]
            }
        },
        "overlay_ibgp_asn": {
            "type": "integer",
            "title": "iBGP ASN for Contrail overlay network",
            "default": 64512
        },
        "device_auth": {
            "title": "Device Auth",
            "type": "array",
            "items": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                    "username",
                    "password"
                ],
                "properties": {
                    "username": {
                        "type": "string"
                    },
                    "password": {
                        "type": "string"
                    }
                }
            }
        },
        "node_profiles": {
            "type": "array",
            "items": {
                "title": "Node profile",
                "type": "object",
                "description": "List of node profiles to be used by the fabric.",
                "additionalProperties": false,
                "properties": {
                    "node_profile_name": {
                        "type": "string"
                    },
                    "serial_nums": {
                        "type": "array",
                        "description": "Optional list of serial numbers of fabric devices that we want to associate with this node profile.",
                        "items": {
                            "type": "string"
                        }
                    }
                },
                "required": [
                    "node_profile_name"
                ]
            }
        },
        "interface_filters": {
            "type": "array",
            "items": {
                "type": "object",
                "maxProperties": 2,
                "additionalProperties": false,
                "properties": {
                    "op": {
                        "enum": [
                            "regex",
                            "startwith"
                        ]
                    },
                    "expr": {
                        "type": "string"
                    }
                },
                "title": "filter object",
                "description": "filter object having op and expr fields",
                "default": {},
                "examples": [
                    {
                        "op": "regex",
                        "expr": "^ge-"
                    },
                    {
                        "op": "regex",
                        "expr": "^xe"
                    }
                ]
            }
        },
        "device_count": {
            "title": "Number of fabric devices",
            "type": "integer",
            "description": "Total number of devices in the fabric that needs to be zero-touch provisioned"
        }
    }
}