¡@

Home 

OpenStack Study: varmour_utils.py

OpenStack Index

**** CubicPower OpenStack Study ****

def get_router_object_prefix(ri):

    return ROUTER_OBJ_PREFIX + ri.router['id'][:OBJ_PREFIX_LEN]

**** CubicPower OpenStack Study ****

def get_firewall_object_prefix(ri, fw):

    return get_router_object_prefix(ri) + '-' + fw['id'][:OBJ_PREFIX_LEN]

**** CubicPower OpenStack Study ****

def get_trusted_zone_name(ri):

    return get_router_object_prefix(ri) + TRUST_ZONE

**** CubicPower OpenStack Study ****

def get_untrusted_zone_name(ri):

    return get_router_object_prefix(ri) + UNTRUST_ZONE

**** CubicPower OpenStack Study ****

def get_snat_rule_name(ri):

    return get_router_object_prefix(ri) + SNAT_RULE

**** CubicPower OpenStack Study ****

def get_dnat_rule_name(ri):

    return get_router_object_prefix(ri) + DNAT_RULE

**** CubicPower OpenStack Study ****

def get_router_policy_name(ri):

    return get_router_object_prefix(ri) + ROUTER_POLICY

**** CubicPower OpenStack Study ****

def get_firewall_policy_name(ri, fw, rule):

    return get_firewall_object_prefix(ri, fw) + rule['id'][:OBJ_PREFIX_LEN]