Re: GUI for network interface
On Wed, 16 May 2012 22:51:57 +0530, Tanveer Ali Sha
<shaikhtali@gmail.com> declaimed the following in
gmane.comp.python.django.user:
> EXAMPLE COMPONENT DESIGN:
>
> -----------------------------------------------
>
> COMPONENT --> PHYSCIAL NETWORK INTERFACE
>
> COMPONENT_KEY --> INTERFACE NUMBER
>
> START_COMPONENT_SCRIPT --> Bringup_interface <interface_nm>
>
> SYNC_COMPONENT_SCRIPT --> Setup_interface <interface_num>
>
>
>
Well, that's a start...
I presume the two scripts apply to all interfaces (and are not
specific to each).
In that case we are left with:
1 obtaining the list of interfaces
Are these coming from a database (which is what most of Django is
built to use, as "Models" implement retrieval/saving of records)
2 obtaining the current state of the interfaces
Some OS-specific command
3 displaying the list with buttons or check-boxes to select the
operation to perform on the interface
Django template system
4 executing the script
Many variations depending on what you really need from it
(os.system, popen, etc.)
5 refresh
Go back to step 2
Complications: This is easy if all the interfaces are on the
computer running the Django process... But if you want to control
/other/ computers you will need a means of obtaining the information in
1&2 from the other computers; and a means of connecting to those
computers to perform step 4 (if the computer network interface is down,
how will you connect to bring it up?)
1, 2, and 4 are nothing to do with Django; if you don't know how to
do those steps, you need to ask in a different forum (Well, if the list
in step 1 comes from a database, then you have a Django management
interface and models). Only step 3 is completely within the realms of
Django (unless you want to graph network connectivity in terms of
a <-> b
a <-> c
b <-> c
b <-> d
c <-> d
in which case you will need to obtain the network routing tables and use
some graphical program to create the diagram for display)
Remember that Django is a web application toolkit. That means users
will be using a web-browser to connect to a web-server to get to your
application, and the web-server machine will be the one issuing the
commands to manage the network. You may need to worry about
authentication to restrict who can run the scripts (displaying current
network status is relatively harmless, unless knowing what machines are
out there is supposed to be confidential -- so authorization only has to
limit acting on the scripts).
Given the vagueness of your request for help... I'd suggest first
trying to write a simple console (command line) program that just
displays a list of interfaces and current status, and allows for
specifying an entry of the list and the operation to be performed:
1 interfacename1 2 interfacename2
3 interfacename3 ...
> enter "start #" or "sync #"
...
Once you have THAT working, you will have the answer to steps 1, 2,
and 4. Then you can consider building a Django application that
incorporates those functions.
--
Wulfraed Dennis Lee Bieber AF6VN
wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home