The datalog_primitives module¶
Primitive tables exported from OpenStack for Datalog
-
class
octant.datalog_primitives.BoolType¶ Transcode boolean in Z3
-
marshall(val)¶ Transforms a value from OpenStack in a string or int.
-
to_os(val)¶ Transforms a value from Z3 back to python
-
to_z3(val)¶ Transforms a value from OpenStack in a Z3 value
-
unmarshall(val)¶ Transforms back a string to a raw OpenStack value.
-
-
class
octant.datalog_primitives.IpAddressType¶ Transcode IP address in Z3
-
marshall(val)¶ Transforms a value from OpenStack in a string or int.
-
to_os(val)¶ Transforms a value from Z3 back to python
-
to_z3(val)¶ Transforms a value from OpenStack in a Z3 value
-
unmarshall(val)¶ Transforms back a string to a raw OpenStack value.
-
-
class
octant.datalog_primitives.NumType(name, size=32)¶ Transcode numbers in Z3
-
marshall(val)¶ Transforms a value from OpenStack in a string or int.
-
to_os(val)¶ Transforms a value from Z3 back to python
-
to_z3(val)¶ Transforms a value from OpenStack in a Z3 value
-
unmarshall(val)¶ Transforms back a string to a raw OpenStack value.
-
-
class
octant.datalog_primitives.Operation(args, result, ty_vars, z3)¶ -
args¶ Alias for field number 0
-
result¶ Alias for field number 1
-
ty_vars¶ Alias for field number 2
-
z3¶ Alias for field number 3
-
-
class
octant.datalog_primitives.StringType(name, size=16)¶ Transcode strings in Z3
-
marshall(val)¶ Transforms a value from OpenStack in a string or int.
-
to_os(val)¶ Transforms a value from Z3 back to python
-
to_z3(val)¶ Transforms a value from OpenStack in a Z3 value
-
unmarshall(val)¶ Transforms back a string to a raw OpenStack value.
-
-
class
octant.datalog_primitives.Z3Type(name, type_instance)¶ Translate Openstack values to Z3
-
marshall(val)¶ Transforms a value from OpenStack in a string or int.
-
to_os(val)¶ Transforms a value from Z3 back to python
-
to_z3(val)¶ Transforms a value from OpenStack in a Z3 value
-
type()¶ Gives back the Z3 type
-
unmarshall(val)¶ Transforms back a string to a raw OpenStack value.
-
-
octant.datalog_primitives.bits_of_mask(mask)¶ Bit size of a network mask
From an integer representing a network mask, extract the number of bits of the mask (for cidr notation).
-
octant.datalog_primitives.ip_of_cidr(cidr)¶ Returns the full ip address even when given in CIDR format
Works for both cidr or single address
-
octant.datalog_primitives.is_primitive(atom)¶ Checks if the atom is a primitive predicate
-
octant.datalog_primitives.mask_of_network(cidr)¶ Returns the mask of a network in CIDR format
If cidr is a single address, the mask will be 255.255.255.255
-
octant.datalog_primitives.prefix_of_network(cidr)¶ Returns the prefix of a network in CIDR format
If cidr is a single address, returns that address.