congress.datalog.builtin
Module¶congress.datalog.builtin.
CongressBuiltinCategoryMap
(start_builtin_map)¶Bases: object
add_map
(newmap)¶builtin
(table)¶Return a CongressBuiltinPred for given Tablename or None.
builtin_is_registered
(predtotest)¶Given a CongressBuiltinPred, check if it has been registered.
delete_all_in_category
(category)¶delete_builtin
(category, name, inputs)¶delete_category
(category)¶delete_from_category
(category, pred)¶delete_map
(newmap)¶dict_predtriple_to_pred
(predtriple)¶exists_category
(category)¶get_category_name
(predname, predinputs)¶insert_category
(category)¶insert_to_category
(category, pred)¶is_builtin
(table, arity=None)¶Given a Tablename and arity, check if it is a builtin.
list_available_builtins
()¶Print out the list of builtins, by category.
mapequal
(othercbc)¶sync_with_predlist
(predname, pred, category, operation)¶congress.datalog.builtin.
CongressBuiltinPred
(name, arglist, num_inputs, code)¶Bases: object
string_to_pred
(predstring)¶congress.datalog.builtin.
DatetimeBuiltins
¶Bases: object
datetime_equal
(x, y)¶datetime_greaterthan
(x, y)¶datetime_greaterthanequal
(x, y)¶datetime_lessthan
(x, y)¶datetime_lessthanequal
(x, y)¶datetime_minus
(x, y)¶datetime_plus
(x, y)¶datetime_to_seconds
(x)¶extract_date
(x)¶extract_time
(x)¶now
()¶pack_date
(year, month, day)¶pack_datetime
(year, month, day, hour, minute, second)¶pack_time
(hour, minute, second)¶to_datetime
(x)¶to_timedelta
(x)¶unpack_date
(x)¶unpack_datetime
(x)¶unpack_time
(x)¶congress.datalog.builtin.
NetworkAddressBuiltins
¶Bases: object
ip_in_network
(ip, cidr)¶ips_equal
(ip1, ip2)¶ips_greaterthan
(ip1, ip2)¶ips_greaterthan_equal
(ip1, ip2)¶ips_lessthan
(ip1, ip2)¶ips_lessthan_equal
(ip1, ip2)¶networks_equal
(cidr1, cidr2)¶networks_overlap
(cidr1, cidr2)¶congress.datalog.builtin.
OptTypeBuiltins
¶Bases: object
Builtins to validate option values for config validator.
It leverages oslog_config types module to check values.
validate_float
(minv, maxv, value)¶Check that the value is a float
Optionnally checks the float is between given bounds if provided. :param minv: minimal value or empty string :param maxv: maximal value or empty string :param value: value to check :return: an empty string if ok or an error string.
validate_int
(minv, maxv, value)¶Check that the value is indeed an integer
Optionnally checks the integer is between given bounds if provided. :param minv: minimal value or empty string :param maxv: maximal value or empty string :param value: value to check :return: an empty string if ok or an error string.
validate_string
(regex, max_length, quotes, ignore_case, value)¶Check that the value is a string
Optionnally checks the string against typical requirements. :param regex: a regular expression the value should follow or empty :param max_length: an integer bound on the size of the string or empty :param quotes: whether to include quotes or not :param ignore_case: whether to ignore case or not :param value: the value to check :return: an empty string if ok or an error string.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.