Beispiel #1
0
    def central_gateway_node(self):
        """
        Central Gateway Node acts as the hub of a hub-spoke VPN. 

        :rtype: SubElementCollection(GatewayNode)
        """
        return sub_collection(self.get_relation('central_gateway_node'),
                              type('CentralGatewayNode', (GatewayNode, ), {}))
Beispiel #2
0
    def disabled_sites(self):
        """
        Return a collection of VPN Site elements that are disabled
        for this VPN gateway.

        :rtype: SubElementCollection(VPNSite)
        """
        return sub_collection(self.get_relation("disabled_vpn_site"), GatewayTreeNode)
Beispiel #3
0
    def mobile_gateway_node(self):
        """
        Mobile Gateway's are represented by client endpoints connecting
        to the policy based VPN.

        :rtype: SubElementCollection(GatewayNode)
        """
        return sub_collection(self.get_relation('mobile_gateway_node'),
                              type('MobileGatewayNode', (GatewayNode, ), {}))
Beispiel #4
0
    def central_gateway_node(self):
        """
        Central Gateway Node acts as the hub of a hub-spoke VPN. 

        :rtype: SubElementCollection(GatewayNode)
        """
        return sub_collection(
            self.get_relation('central_gateway_node'),
            type('CentralGatewayNode', (GatewayNode,), {}))
Beispiel #5
0
    def satellite_gateway_node(self):
        """
        Node level settings for configured satellite gateways

        :rtype: SubElementCollection(GatewayNode)
        """
        return sub_collection(
            self.get_relation('satellite_gateway_node'),
            type('SatelliteGatewayNode', (GatewayNode,), {}))
Beispiel #6
0
    def disabled_sites(self):
        """
        Return a collection of VPN Site elements that are disabled
        for this VPN gateway.

        :rtype: SubElementCollection(VPNSite)
        """
        return sub_collection(
            self.get_relation('disabled_vpn_site'), GatewayTreeNode)
Beispiel #7
0
    def satellite_gateway_node(self):
        """
        Node level settings for configured satellite gateways

        :rtype: SubElementCollection(GatewayNode)
        """
        return sub_collection(
            self.get_relation('satellite_gateway_node'),
            type('SatelliteGatewayNode', (GatewayNode, ), {}))
Beispiel #8
0
 def internal_endpoint(self):
     """
     Internal endpoints to enable VPN for the engine.
     
     :rtype: SubElementCollection(InternalEndpoint)
     """
     return sub_collection( 
         self.internal_gateway.get_relation('internal_endpoint'), 
         InternalEndpoint) 
Beispiel #9
0
    def snapshots(self):
        """
        References to policy based snapshots for this engine, including
        the date the snapshot was made

        :raises EngineCommandFailed: failure downloading, or IOError
        :rtype: SubElementCollection(Snapshot)
        """
        return sub_collection(
            self.get_relation('snapshots', EngineCommandFailed), Snapshot)
Beispiel #10
0
    def mobile_gateway_node(self):
        """
        Mobile Gateway's are represented by client endpoints connecting
        to the policy based VPN.

        :rtype: SubElementCollection(GatewayNode)
        """
        return sub_collection(
            self.get_relation('mobile_gateway_node'),
            type('MobileGatewayNode', (GatewayNode,), {}))
    def nodes(self):
        """
        Return the nodes for this VSS Container

        :rtype: SubElementCollection(VSSContainerNode)
        """
        resource = sub_collection(self.get_relation("vss_container_node"),
                                  VSSContainerNode)
        resource._load_from_engine(self, "nodes")
        return resource
Beispiel #12
0
 def nodes(self):
     """
     Return the nodes for this VSS Container
     
     :rtype: SubElementCollection(VSSContainerNode)
     """
     resource = sub_collection(
         self.get_relation('vss_container_node'), 
         VSSContainerNode) 
     resource._load_from_engine(self, 'nodes') 
     return resource
Beispiel #13
0
    def tunnels(self):
        """
        Return all tunnels for this RBVPN in case of Tunnel Type 'VPN'.
        This provides access to enabling/disabling for the linked endpoints.
        List all tunnel mappings for this route vpn::

            for tunnel in rb_vpn.tunnels:
                print(tunnel.enabled)

        :rtype: SubElementCollection(EndpointTunnel)
        """
        return sub_collection(self.get_relation("gateway_endpoint_tunnel"),
                              EndpointTunnel)
    def update_package(self):
        """
        Show all update packages on SMC.
        
        To find specific updates available from the returned
        collection, use convenience methods::
        
            system = System()
            updates = system.update_package()
            updates.get_contains('1027')

        :raises ActionCommandFailed: failure to retrieve resource
        :rtype: SubElementCollection(UpdatePackage)
        """
        return sub_collection(self.get_relation('update_package'),
                              UpdatePackage)
Beispiel #15
0
    def update_package(self):
        """
        Show all update packages on SMC.
        
        To find specific updates available from the returned
        collection, use convenience methods::
        
            system = System()
            updates = system.update_package()
            updates.get_contains('1027')

        :raises ActionCommandFailed: failure to retrieve resource
        :rtype: SubElementCollection(UpdatePackage)
        """
        return sub_collection(
            self.get_relation('update_package'),
            UpdatePackage)
    def engine_upgrade(self):
        """
        List all engine upgrade packages available

        To find specific upgrades available from the returned
        collection, use convenience methods::
        
            system = System()
            upgrades = system.engine_upgrade()
            upgrades.get_contains('6.2')
            upgrades.get_all_contains('6.2')

        :param engine_version: Version of engine to retrieve
        :raises ActionCommandFailed: failure to retrieve resource
        :rtype: SubElementCollection(EngineUpgrade)
        """
        return sub_collection(self.get_relation('engine_upgrade'),
                              EngineUpgrade)
Beispiel #17
0
    def tunnels(self):
        """
        Return all tunnels for this VPN. A tunnel is defined as two end
        points within the VPN topology. Endpoints are automatically
        configureed based on whether they are a central gateway or
        satellite gateway. This provides access to enabling/disabling
        and setting the preshared key for the linked endpoints.
        List all tunnel mappings for this policy vpn::

            for tunnel in policy.tunnels:
                tunnela = tunnel.tunnel_side_a
                tunnelb = tunnel.tunnel_side_b
                print(tunnela.gateway)
                print(tunnelb.gateway)

        :rtype: SubElementCollection(GatewayTunnel)
        """
        return sub_collection(self.get_relation("gateway_tunnel"), GatewayTunnel)
Beispiel #18
0
 def tunnels(self):
     """
     Return all tunnels for this VPN. A tunnel is defined as two end
     points within the VPN topology. Endpoints are automatically
     configureed based on whether they are a central gateway or 
     satellite gateway. This provides access to enabling/disabling
     and setting the preshared key for the linked endpoints.
     List all tunnel mappings for this policy vpn::
     
         for tunnel in policy.tunnels:    
             tunnela = tunnel.tunnel_side_a
             tunnelb = tunnel.tunnel_side_b
             print(tunnela.gateway)
             print(tunnelb.gateway)
 
     :rtype: SubElementCollection(GatewayTunnel)
     """
     return sub_collection(
         self.get_relation('gateway_tunnel'), GatewayTunnel)
Beispiel #19
0
    def engine_upgrade(self):
        """
        List all engine upgrade packages available

        To find specific upgrades available from the returned
        collection, use convenience methods::
        
            system = System()
            upgrades = system.engine_upgrade()
            upgrades.get_contains('6.2')
            upgrades.get_all_contains('6.2')

        :param engine_version: Version of engine to retrieve
        :raises ActionCommandFailed: failure to retrieve resource
        :rtype: SubElementCollection(EngineUpgrade)
        """
        return sub_collection(
            self.get_relation('engine_upgrade'),
            EngineUpgrade)