Network Peer

Network peer resources interconnect two private networks. This resource inherits from Resource Class and has direct access to the resource’s database object. The following attributes are directly accessible:

attr resource_id:
 The primary resource identifier that takes the form of a prefix followed by numbers and letters
attr organization_service_id:
 The ID of the parent organization service (cloud)
attr region_name:
 The region that the network resides in
attr peer_id:The ID of the network
attr name:The name of the network
attr status:The state of the network peer status
attr requester_vpc_owner:
 The owner of the network requesting peering access
attr requester_vpc_id:
 The ID of the network requesting peering access
attr requester_vpc_cidr:
 The CIDR block of the network requesting peering access
attr accepter_vpc_owner:
 The owner of the network accepting the peer request
attr accepter_vpc_id:
 The ID of the network accepting the peer request
attr accepter_vpc_cidr:
 The CIDR block of the network accepting the peer request
attr allow_egress_classic:
 Denotes if you’ve enabled any EC2-Classic instances to communicate with instances in the peered network
attr allow_egress_vpc:
 Denotes if your network is a source or destination for ingress or egress rules in your resource access lists
attr allow_dns_resolution:
 Denotes if your network peer connection has enabled DNS hostname resolution
class DivvyResource.Resources.networkpeer.NetworkPeer(resource_id)

Bases: DivvyResource.Resources.resource.Resource

Network Peer Operations

static get_db_class()
get_parent_resource_id()
static get_provider_id_field()
static get_resource_type()
handle_resource_created(user_resource_id=None, project_resource_id=None)

This should be called when a resource is created/discovered after the basic data is added to the database. This gives an opportunity for post-addition hooks (assignment to projects/groups, alerts, etc)

handle_resource_destroyed(user_resource_id=None, project_resource_id=None)

This should be called when a resource is destroyed before the basic data is removed from the database. This gives an opportunity for pre-destruction hooks (removal from projects/groups, alerts, etc).

handle_resource_modified(resource, *args, **kwargs)

This should be called when a resource is modified after the new data has been updated in the DB session. This gives an opportunity for post-modification hooks.

network_peer
peer_id