Documentation ¶
Index ¶
- func NewRedisClient(host string) (*redis.Client, error)
- type AEInterface
- type BGP
- type BGPGroup
- type Config
- type Data
- type EthernetInterface
- type EthernetSwitching
- type HostData
- type HttpConfig
- type IRBInterface
- type JunosConfig
- type LdapConfig
- type Listener
- type NatsConfig
- type NetworkHost
- type NetworkZone
- type RedisConfig
- type Room
- type RouterAdvertisement
- type Security
- type SecurityPolicies
- type SecurityPolicy
- type SecurityZone
- type SecurityZoneInterface
- type SimpleSecurityPolicy
- type Znet
- func (z *Znet) ConfigureNetworkHost(host *NetworkHost, commit bool)
- func (z *Znet) DataForDevice(host NetworkHost) HostData
- func (z *Znet) GetNetworkHosts(l *ldap.Conn, baseDN string) []NetworkHost
- func (z *Znet) GetNetworkZones(l *ldap.Conn, baseDN string) []NetworkZone
- func (z *Znet) HierarchyForDevice(host NetworkHost) []string
- func (z *Znet) Listen(listenAddr string, ch chan bool)
- func (z *Znet) LoadConfig(file string)
- func (z *Znet) LoadData(configDir string)
- func (z *Znet) NewLDAPClient(config LdapConfig) (*ldap.Conn, error)
- func (z *Znet) RenderHostTemplateFile(host NetworkHost, path string) string
- func (z *Znet) TemplateStringsForDevice(host NetworkHost, templates []string) []string
- func (z *Znet) TemplatesForDevice(host NetworkHost) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AEInterface ¶ added in v0.1.0
type Config ¶
type Config struct { Rooms []Room `yaml:"rooms"` Endpoint string `yaml:"endpoint"` Nats NatsConfig `yaml:"nats,omitempty"` Junos NatsConfig `yaml:"junos,omitempty"` Redis RedisConfig `yaml:"redis,omitempty"` Http HttpConfig `yaml:"http,omitempty"` Ldap LdapConfig `yaml:"ldap,omitempty"` }
type EthernetInterface ¶ added in v0.1.0
type EthernetSwitching ¶ added in v0.1.0
type HostData ¶ added in v0.1.0
type HostData struct { NTPServers []string `yaml:"ntp_servers"` DHCPServer string `yaml:"dhcp_server"` DHCPForwardInterfaces []string `yaml:"dhcp_forward_interfaces"` LLDPInterfaces []string `yaml:"lldp_interfaces"` IRBInterfaces []IRBInterface `yaml:"irb_interfaces"` AEInterfaces []AEInterface `yaml:"ae_interfaces"` EthernetInterfaces []EthernetInterface `yaml:"eth_interfaces"` RouterAdvertisements []RouterAdvertisement `yaml:"router_advertisements"` BGP BGP `yaml:"bgp"` Security Security `yaml:"security"` }
type HttpConfig ¶ added in v0.1.0
type HttpConfig struct {
ListenAddress string
}
type IRBInterface ¶ added in v0.1.0
type JunosConfig ¶ added in v0.1.0
type LdapConfig ¶ added in v0.1.0
type Listener ¶ added in v0.1.0
type Listener struct { Config *Config // contains filtered or unexported fields }
func NewListener ¶ added in v0.1.0
type NatsConfig ¶ added in v0.1.0
type NetworkHost ¶ added in v0.1.0
type NetworkZone ¶ added in v0.1.0
type RedisConfig ¶ added in v0.1.0
type RedisConfig struct {
Host string
}
type RouterAdvertisement ¶ added in v0.1.0
type Security ¶ added in v0.1.0
type Security struct { Zones []SecurityZone `yaml:"zones"` Policies []SecurityPolicies `yaml:"policies"` SimplePolicies []SimpleSecurityPolicy `yaml:"simple_policies"` }
type SecurityPolicies ¶ added in v0.1.0
type SecurityPolicies struct { From string `yaml:"from"` To string `yaml:"to"` Policies []SecurityPolicy `yaml:"policies"` }
type SecurityPolicy ¶ added in v0.1.0
type SecurityZone ¶ added in v0.1.0
type SecurityZone struct { Name string `yaml:"name"` Screen string `yaml:"screen"` SystemServices []string `yaml:"system_services"` Protocols []string `yaml:"protocols"` Interfaces []SecurityZoneInterface `yaml:"interfaces"` }
type SecurityZoneInterface ¶ added in v0.1.0
type SimpleSecurityPolicy ¶ added in v0.1.0
type Znet ¶ added in v0.1.0
type Znet struct { ConfigDir string Config Config Data Data // contains filtered or unexported fields }
func (*Znet) ConfigureNetworkHost ¶ added in v0.1.0
func (z *Znet) ConfigureNetworkHost(host *NetworkHost, commit bool)
func (*Znet) DataForDevice ¶ added in v0.1.0
func (z *Znet) DataForDevice(host NetworkHost) HostData
DataForDevice
func (*Znet) GetNetworkHosts ¶ added in v0.1.0
func (z *Znet) GetNetworkHosts(l *ldap.Conn, baseDN string) []NetworkHost
func (*Znet) GetNetworkZones ¶ added in v0.1.0
func (z *Znet) GetNetworkZones(l *ldap.Conn, baseDN string) []NetworkZone
func (*Znet) HierarchyForDevice ¶ added in v0.1.0
func (z *Znet) HierarchyForDevice(host NetworkHost) []string
HierarchyForDevice retuns a list of file paths to consult for the data hierarchy.
func (*Znet) LoadConfig ¶ added in v0.1.0
func (*Znet) NewLDAPClient ¶ added in v0.1.0
func (z *Znet) NewLDAPClient(config LdapConfig) (*ldap.Conn, error)
func (*Znet) RenderHostTemplateFile ¶ added in v0.1.0
func (z *Znet) RenderHostTemplateFile(host NetworkHost, path string) string
RenderHostTemplateFile renders a template file using a Host object.
func (*Znet) TemplateStringsForDevice ¶ added in v0.1.0
func (z *Znet) TemplateStringsForDevice(host NetworkHost, templates []string) []string
TemplateStringsForDevice renders a list of template strings given a host.
func (*Znet) TemplatesForDevice ¶ added in v0.1.0
func (z *Znet) TemplatesForDevice(host NetworkHost) []string
TemplatesForDevice returns a list of template paths for a given host.
Click to show internal directories.
Click to hide internal directories.