Enter search terms or a module, class or function name.
Bases: django.db.models.base.Model
A Transport represents a way of connecting the user with the service.
Sample of transports are RDP, Spice, Web file uploader, etc...
Used to invoke the Service class “Destroy” before deleting it from database.
The main purpuse of this hook is to call the “destroy” method of the object to delete and to clear related data of the object (environment data such as own storage, cache, etc...
Note: | If destroy raises an exception, the deletion is not taken. |
---|
Returns an environment valid for the record this object represents
Instantiates the object this record contains.
Every single record of Provider model, represents an object.
Raises:
Get the type of the object this record represents.
The type is Python type, it obtains this type from ServiceProviderFactory and associated record field.
Note: | We only need to get info from this, not access specific data (class specific info) |
---|
Checks if this transport is valid for the specified IP.
True if the ip can access this Transport.
False if the ip can’t access this Transport.
The ip check is done this way: * If The associated network is empty, the result is always True * If the associated network is not empty, and nets_positive (field) is True, the result will be True if the ip is contained in any subnet associated with this transport. * If the associated network is empty, and nets_positive (field) is False, the result will be True if the ip is NOT contained in ANY subnet associated with this transport.
Raises:
Note: | Ip addresses has been only tested with IPv4 addresses |
---|
Bases: django.db.models.base.Model
This model is used for keeping information of networks associated with transports (right now, just transports..)
Creates an network record, with the specified net start and net end (dotted quad)
netStart: Network start
netEnd: Network end
Property to access the quad dotted format of the stored network end
Property to access the quad dotted format of the stored network start
Returns the networks that are valid for specified ip in dotted quad (xxx.xxx.xxx.xxx)
Updated this network with provided values
name: new name of the network
netStart: new Network start (quad dotted)
netEnd: new Network end (quad dotted)