On Mon, Mar 27, 2017 at 7:18 PM Rohith Asrk <[email protected]> wrote:

> Hi,
>
> I have some doubts regarding the implementation of
> openwisp-network-topology. They are as follows,
>
> 1. *"Each model of django-netjsongraph must be related to a specific
> organisation."* - By model, I think we are referring to a particular
> topology, isn't it?
>

Yes, but also Nodes and Links should probably have this relation.

One organization may have multiple topologies.

So if links and nodes have a relation to "Organization" it will be easier
to filter all the nodes and links of a specific organization.


> Therefore, we will have a new model which inherits the topology model and
> have attributes which have a foreign key to organisations in
> openwisp-users. Am I right?
>

You will need to implement something like:

https://github.com/openwisp/openwisp-controller/blob/master/openwisp_controller/config/models.py#L66-L82

and

https://github.com/openwisp/openwisp-controller/blob/master/openwisp_controller/config/models.py#L95-L108

but first you will have to improve the abstract models of
django-netjsongraph because otherwise (at the present state) it would not
be possible to use the same pattern.

And if this is right, we have users in organisations and users shall only
> be able to see the topologies of their own organisations?
>

superadmin users will be able to see everything, while the rest of the
users will be able to see only objects of organizations they belong to.

You may be able to reuse some of the logic in openwisp-controller:
https://github.com/openwisp/openwisp-controller/blob/master/openwisp_controller/admin.py

2. Any resources to read up more on the status formats of OpenVPN(version1
> and version2) and writing parsers?
>

Here's an example of version 1 output:

OpenVPN CLIENT LIST
Updated,Mon Mar 27 18:47:04 2017
Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
claud43nodo1,80.181.191.1:50268,53875636,192011412,Sun Mar 26 09:06:20 2017
LeMonacelle,2.226.154.66:44846,5164751,19264301,Mon Mar 27 16:10:59 2017
Syskrack,79.26.49.2:60616,56928467,189355476,Sun Mar 26 09:06:19 2017
Kali2,2.226.154.66:55438,52681920,193489019,Sun Mar 26 09:06:20 2017
mirko,79.36.196.24:65039,1057697,245684199,Sun Mar 26 09:06:20 2017
buda,79.12.108.6:62026,1061815,245676448,Sun Mar 26 09:06:23 2017
pomezia,95.251.243.132:50275,1058494,245684089,Sun Mar 26 09:06:21 2017
ROUTING TABLE
Virtual Address,Common Name,Real Address,Last Ref
aa:f7:ef:8f:55:52,Syskrack,79.26.49.2:60616,Mon Mar 27 18:45:29 2017
8a:0b:ac:35:42:c6,LeMonacelle,2.226.154.66:44846,Mon Mar 27 16:11:01 2017
a6:26:32:97:8b:6c,claud43nodo1,80.181.191.1:50268,Sun Mar 26 23:14:10 2017
c4:6e:1f:ff:02:23,Kali2,2.226.154.66:55438,Mon Mar 27 18:45:29 2017
GLOBAL STATS
Max bcast/mcast queue length,11
END

Try to look on google to find an example of version 2 output, but it's just
text.

PS: start writing your applications in the gsoc system and flag them as
draft.

Federico

-- 
You received this message because you are subscribed to the Google Groups 
"OpenWISP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to