コード例 #1
0
def get_route_table():
    route_table = RouteTable()
    route_table.display_name = 'ansible_route_table'
    route_table.compartment_id = 'ocid1.compartment.oc1..aa'
    route_table.id = 'ocid1.routetable.oc1.phx.aa'
    route_table.lifecycle_state = 'AVAILABLE'
    route_table.route_rules = [get_common_route_rule()]
    route_table.time_created = '2017-11-15T16:48:06.784000+00:00'
    route_table.vcn_id = 'ocid1.vcn.oc1.phx.aa'

    return route_table
コード例 #2
0
def get_route_table():
    route_table = RouteTable()
    route_table.display_name = 'ansible_route_table'
    route_table.compartment_id = 'ocid1.compartment.oc1..aa'
    route_table.id = 'ocid1.routetable.oc1.phx.aa'
    route_table.lifecycle_state = 'AVAILABLE'
    route_table.route_rules = [get_common_route_rule()]
    route_table.time_created = '2017-11-15T16:48:06.784000+00:00'
    route_table.vcn_id = 'ocid1.vcn.oc1.phx.aa'
    route_table.freeform_tags = {'route_type': 'internet'}
    route_table.defined_tags = {'admin_type': {'admin_role': 'super_user'}}

    return route_table
コード例 #3
0
from ortu.oci_route_table import check_route
from oci.core.models import RouteTable, RouteRule

SOURCE_ROUTE_RULES = [
    RouteRule(
        destination='0.0.0.0/0',
        destination_type='CIDR_BLOCK',
        network_entity_id='ocid1.internetgateway.oc1.region.somelongstring')
]

SOURCE_ROUTE_TABLE = RouteTable(route_rules=SOURCE_ROUTE_RULES)

NEW_ROUTE_RULES = [
    RouteRule(
        destination='0.0.0.0/0',
        destination_type='CIDR_BLOCK',
        network_entity_id='ocid1.internetgateway.oc1.region.somelongstring'),
    RouteRule(destination='192.168.1.0/24',
              destination_type='CIDR_BLOCK',
              network_entity_id=
              'ocid1.internetgateway.oc1.region.anotherlongcrazystring'),
    RouteRule(destination='all-fra-services-in-oracle-services-network',
              destination_type='SERVICE_CIDR_BLOCK',
              network_entity_id=
              'ocid1.servicegateway.oc1.region.anotherlongcrazystringforsg')
]

NEW_ROUTE_TABLE = RouteTable(route_rules=NEW_ROUTE_RULES)

CIDR = '192.168.1.0/24'
NE_OCID = 'ocid1.internetgateway.oc1.region.anotherlongcrazystring'
コード例 #4
0
def get_route_table():
    route_table = RouteTable()
    route_table.display_name = "ansible_route_table"
    route_table.compartment_id = "ocid1.compartment.oc1..aa"
    route_table.id = "ocid1.routetable.oc1.phx.aa"
    route_table.lifecycle_state = "AVAILABLE"
    route_table.route_rules = [get_common_route_rule()]
    route_table.time_created = "2017-11-15T16:48:06.784000+00:00"
    route_table.vcn_id = "ocid1.vcn.oc1.phx.aa"
    route_table.freeform_tags = {"route_type": "internet"}
    route_table.defined_tags = {"admin_type": {"admin_role": "super_user"}}

    return route_table
コード例 #5
0
        network_entity_id='ocid1.internetgateway.oc1.region.igid'
    ),
    RouteRule(
        destination='192.168.1.0/24',
        destination_type='CIDR_BLOCK',
        network_entity_id='ocid1.localpeeringgateway.oc1.region.lpgid'
    ),
    RouteRule(
        destination='all-fra-services-in-oracle-services-network',
        destination_type='SERVICE_CIDR_BLOCK',
        network_entity_id='ocid1.servicegateway.oc1.region.sgwid'
    )
]

WO_CIDR_ROUTE_TABLE = RouteTable(
    route_rules=WO_CIDR_ROUTE_RULES
)

WO_SERVICE_ROUTE_TABLE = RouteTable(
    route_rules=WO_SERVICE_ROUTE_RULES
)

ROUTE_TABLE = RouteTable(
    route_rules=SERVICE_ROUTE_RULES
)

CIDR = '0.0.0.0/0'
IG_ID = 'ocid1.internetgateway.oc1.region.igid'
SERVICE_CIDR = 'all-fra-services-in-oracle-services-network'
SG_ID = 'ocid1.servicegateway.oc1.region.sgwid'