Module ip¶
- License: Apache 2.0
- Version: 0.10.0
- Author: Inmanta <code@inmanta.com>
- This module requires compiler version 2016.5 or higher
- Upstream project: https://github.com/inmanta/ip.git
Typedefs¶
-
typedef
ip::cidr¶ - Base type
string - Type constraint
(self regex re.compile('^([0-9]{1,3})(\\.[0-9]{1,3}){3}.[0-9]{1,2}$'))
- Base type
-
typedef
ip::ip¶ - Base type
string - Type constraint
(ip::is_valid_ip(self) == True)
- Base type
-
typedef
ip::port¶ - Base type
number - Type constraint
((self >= 0) and (self < 65536))
- Base type
-
typedef
ip::protocol¶ - Base type
string - Type constraint
(((((self == 'tcp') or (self == 'udp')) or (self == 'icmp')) or (self == 'sctp')) or (self == 'all'))
- Base type
Entities¶
-
entity
ip::Address¶ Parents:
ip::AliasThe following implements statements select implementations for this entity:
-
entity
ip::Alias¶ Parents:
ip::IP-
attribute ip::ip
netmask='0.0.0.0'¶
-
attribute number
alias=0¶
-
attribute bool
dhcp=False¶
-
relation ip::services::Server
server[0:*]¶ other end:
ip::services::Server.ips [0:*]
The following implements statements select implementations for this entity:
-
attribute ip::ip
-
entity
ip::DstService¶ Parents:
ip::ServiceThe following implements statements select implementations for this entity:
-
entity
ip::Host¶ Parents:
std::HostA host that has an ip attribute for easy ip address access in the configuration model.
-
attribute ip::port
remote_port=22¶ The remote port for this remote agent to use.
-
attribute bool
remote_agent=False¶ Start the mgmt agent for this node on the server and use remote io (ssh)
-
attribute string
remote_user='root'¶ The remote user for the remote agent to login with
-
attribute ip::ip
ip¶ The ipaddress of this node
-
relation ip::services::Server
servers[0:*]¶ other end:
ip::services::Server.host [1]
-
relation ip::services::Client
clients[0:*]¶ other end:
ip::services::Client.host [1]
The following implements statements select implementations for this entity:
-
attribute ip::port
-
entity
ip::IP¶ Parents:
std::EntityBase class for all ip addresses
-
attribute ip::ip
v4='0.0.0.0'¶
The following implements statements select implementations for this entity:
-
attribute ip::ip
-
entity
ip::Network¶ Parents:
std::EntityA network in this infrastructure.
-
attribute string
netmask¶
-
attribute string
name¶
-
attribute string
network¶
-
attribute bool
dhcp¶
The following implements statements select implementations for this entity:
-
attribute string
-
entity
ip::Port¶ Parents:
ip::PortRange-
attribute ip::port
high=0¶
The following implements statements select implementations for this entity:
-
attribute ip::port
-
entity
ip::PortRange¶ Parents:
std::Entity-
attribute ip::port
high¶
-
attribute ip::port
low¶
The following implements statements select implementations for this entity:
-
attribute ip::port
-
entity
ip::Service¶ Parents:
std::EntityDefine a service as a protocol and a source and destination port range
-
attribute ip::protocol
proto¶
-
relation ip::services::BaseServer
listening_servers[0:*]¶ other end:
ip::services::BaseServer.services [0:*]
-
relation ip::PortRange
src_range[0:*]¶
-
relation ip::PortRange
dst_range[0:*]¶
The following implements statements select implementations for this entity:
-
attribute ip::protocol
-
entity
ip::services::BaseClient¶ Parents:
std::EntityBase client class that connects to a server
-
relation ip::services::BaseServer
servers[0:*]¶ other end:
ip::services::BaseServer.clients [0:*]
-
relation ip::services::BaseServer
-
entity
ip::services::BaseServer¶ Parents:
std::EntityBase class for servers that accept connections from clients
-
relation ip::Service
services[0:*]¶ other end:
ip::Service.listening_servers [0:*]
-
relation ip::services::BaseClient
clients[0:*]¶ other end:
ip::services::BaseClient.servers [0:*]
-
relation ip::Service
-
entity
ip::services::Client¶ Parents:
ip::services::BaseClientThis interface models a client that is linked to a host
-
relation ip::Host
host[1]¶ other end:
ip::Host.clients [0:*]
The following implements statements select implementations for this entity:
-
relation ip::Host
-
entity
ip::services::Server¶ Parents:
ip::services::BaseServerThis interface models a server that accepts connections from a client
-
relation ip::Host
host[1]¶ other end:
ip::Host.servers [0:*]
-
relation ip::Alias
ips[0:*]¶ other end:
ip::Alias.server [0:*]
The following implements statements select implementations for this entity:
-
relation ip::Host
-
entity
ip::services::VirtualClient¶ Parents:
ip::services::BaseClient,ip::services::VirtualSideThis interface models a virtual client. It can for example represent all clients that exist on the internet.
-
attribute string
name¶
The following implements statements select implementations for this entity:
-
attribute string
-
entity
ip::services::VirtualHost¶ Parents:
ip::services::VirtualScopeAn address represented by a hostname
-
attribute std::hoststring
hostname¶
The following implements statements select implementations for this entity:
-
attribute std::hoststring
-
entity
ip::services::VirtualIp¶ Parents:
ip::services::VirtualScopeOnly one ip
-
attribute ip::ip
address¶
-
attribute ip::ip
-
entity
ip::services::VirtualNetwork¶ Parents:
ip::services::VirtualScopeDefine a virtual network segment
-
attribute ip::ip
netmask¶
-
attribute ip::ip
network¶
-
attribute ip::ip
-
entity
ip::services::VirtualRange¶ Parents:
ip::services::VirtualScopeA range defined by from/to
-
attribute ip::ip
from¶
-
attribute ip::ip
to¶
The following implements statements select implementations for this entity:
-
attribute ip::ip
-
entity
ip::services::VirtualScope¶ Parents:
std::EntityThis interface represents a scope to determine what a virtual client or server is.
-
relation ip::services::VirtualSide
side[0:*]¶ other end:
ip::services::VirtualSide.scope [0:*]
-
relation ip::services::VirtualSide
-
entity
ip::services::VirtualServer¶ Parents:
ip::services::BaseServer,ip::services::VirtualSideSame as VirtualClient but then for a server
-
attribute string
name¶
-
attribute string
-
entity
ip::services::VirtualSide¶ Parents:
std::EntityA base class for a virtual server or client
-
relation ip::services::VirtualScope
scope[0:*]¶ other end:
ip::services::VirtualScope.side [0:*]
-
relation ip::services::VirtualScope
Plugins¶
-
ip.cidr_to_network(cidr: string) → string¶ Given cidr return the network address
-
ip.concat(host: std::hoststring, domain: std::hoststring) → std::hoststring¶ Concat host and domain
-
ip.connect_to(scope: ip::services::VirtualScope) → string¶
-
ip.hostname(fqdn: string) → string¶ Return the hostname part of the fqdn
-
ip.ipindex(addr: ip::cidr, position: number) → string¶ Return the address at position in the network.
-
ip.ipnet(addr: ip::cidr, what: string) → string¶
-
ip.is_valid_ip(addr: string) → bool¶
-
ip.net_to_nm(network_addr: string) → string¶
-
ip.netmask(cidr: number) → ip::ip¶ Given the cidr, return the netmask
-
ip.network(ip: ip::ip, cidr: string) → string¶ Given the ip and the cidr, return the network address
-
ip.networkaddress(ip: ip::Alias) → string¶ Return the network address