Package backend :: Package server :: Package config_common :: Module templated_document :: Class ServerTemplatedDocument
[hide private]
[frames] | no frames]

Class ServerTemplatedDocument

source code


Instance Methods [hide private]
 
__init__(self, server, start_delim=None, end_delim=None) source code
 
fallback_call(self, fname, params, defval) source code
 
set_functions(self) source code
 
sid(self) source code
 
profile_name(self) source code
 
description(self) source code
 
hostname(self) source code
 
ipaddr(self) source code
 
ip6addr(self) source code
 
_get_network_info_attr(self, attr) source code
 
custom_info(self, key) source code
 
_interface_info(self, interface_name) source code
 
net_intf_ipaddr(self, interface_name) source code
 
net_intf_netmask(self, interface_name) source code
 
net_intf_broadcast(self, interface_name) source code
 
net_intf_ip6addr(self, interface_name, scope='universe', order=0)
get IPv6 address
source code
 
net_intf_ip6netmask(self, interface_name, scope='universe', order=0)
get IPv6 netmask
source code
 
net_intf_hwaddr(self, interface_name) source code
 
net_intf_module(self, interface_name) source code
 
_get_interface_info_attr(self, interface_name, attr) source code
 
_get_interface_address_attr(self, address, attr) source code
 
_get_interface_address6_attr(self, address, scope, order, attr)
return attribute of given address
source code

Inherited from base_templated_document.TemplatedDocument: call, lookup_function, null_call, parse_func_name, strip, test, unquote

Inherited from base_templated_document.BaseTemplatedDocument: interpolate, repl_func, set_delims

Class Variables [hide private]

Inherited from base_templated_document.TemplatedDocument: func_regex, funcname_regex

Inherited from base_templated_document.BaseTemplatedDocument: compiled_regexes

Method Details [hide private]

__init__(self, server, start_delim=None, end_delim=None)
(Constructor)

source code 
Overrides: base_templated_document.BaseTemplatedDocument.__init__

fallback_call(self, fname, params, defval)

source code 
Overrides: base_templated_document.TemplatedDocument.fallback_call

set_functions(self)

source code 
Overrides: base_templated_document.BaseTemplatedDocument.set_functions

net_intf_ip6addr(self, interface_name, scope='universe', order=0)

source code 
get IPv6 address

interface_name is name of interface, e.g. 'eth0'
scope is either 'link', 'universe' or 'host'
order is zero based index as there can be more than one IP address
     for given scope and interface

net_intf_ip6netmask(self, interface_name, scope='universe', order=0)

source code 
get IPv6 netmask

interface_name is name of interface, e.g. 'eth0'
scope is either 'link', 'universe' or 'host'
order is zero based index as there can be more than one IP address
     for given scope and interface

_get_interface_address6_attr(self, address, scope, order, attr)

source code 
return attribute of given address

address is list of interfaces
e.g.: [{'scope': 'universe', 'netmask': '64', 'address': '2620:52:0:2223:20c:29ff:fecb:d06e',
'interface_id': 127}, {'scope': 'link', 'netmask': '64', 'address':
'fe80::20c:29ff:fecb:d06e', 'interface_id': 127}]
scope is either 'link', 'universe' or 'host'
order is zero based index as there can be more than one IP address
     for given scope and interface
attr is attribute, e.g "netmask"