-
-
Save cultleader777/d4f26449d2814a30d6b34e55c5d19c76 to your computer and use it in GitHub Desktop.
ref child keys example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TABLE server { | |
hostname TEXT PRIMARY KEY, | |
ssh_interface REF CHILD network_interface, | |
} | |
TABLE network { | |
network_name TEXT PRIMARY KEY, | |
cidr TEXT, | |
} | |
TABLE network_interface { | |
if_name TEXT PRIMARY KEY CHILD OF server, | |
if_network REF network, | |
if_ip TEXT, | |
if_subnet_mask_cidr INT, | |
} | |
DATA STRUCT network [ | |
{ | |
network_name: lan, | |
cidr: '10.16.0.0/12', | |
} | |
] | |
DATA server(hostname, ssh_interface) { | |
server-a, eth0 WITH network_interface { | |
eth0, lan, 10.17.0.10, 24; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment