Hi Zhongyuan.

zhongyuan sun - Sun Microsystems - Beijing China wrote:
> Thanks, I think more display screens will be added to the configuration
> function like config name service(NIS/DNS....) 
Maybe.  As you say, all network config screens should be encapsulated in 
the configuration function.  We should be able to treat that function as 
a black box.  We call it, and if it returns without error, the network 
is set up.
> Also please gave me more information on these functions interface. what
> arguments should DDU pass in/out.
I made a first guess at the interfaces in the original mail, but they 
could change after I talk with others and take feedback.  Currently:

- The query function would take a URL to ping, and return a boolean 
regarding whether that URL is pingable.

- The config function would take no arguments (because it would prompt 
for everything in the screens) and would return nothing.  If there was a 
problem setting up the network, it would raise an exception.

If I know more tomorrow, we can discuss it at our meeting.

    Thanks,
    Jack
> Thanks,
> Zhongyuan
> ?2009?09?08??06:04?Jack Schwartz???
>   
>> Hi everyone.
>>
>> Last week discussion ensued about the need for the text-mode DDU to have 
>> a way of configuring the network, for the cases where the DDU needs to 
>> read a repo or otherwise fetch a driver.  The system would be coming up 
>> with NWAM enabled, but if the net doesn't have DHCP the network still 
>> won't be reachable.  In this case, a (guided but) manual configuration 
>> of the network is needed.  The text-mode DDU would guide the user 
>> through this configuration.
>>
>> We agreed that there should be a "network setup" library which is shared 
>> between the installer and DDU, so that there is consistency in the 
>> network setup screens.  I think implementation can be as two functions: 
>> one function is for querying whether the network is up; the other is to 
>> configure the network if it is not up.  The DDU China team will need to 
>> know how to call these functions.
>>
>> The query function can take an argument of what to look for and return 
>> True or False depending on whether that argument is pingable.  It would 
>> be up to the DDU to strip all but the system name from an ftp address or 
>> other URL, and pass that system name to the query function.  If in the 
>> course of DDU use, multiple URLs are referenced (perhaps a repo first, 
>> then an ftp URL), multiple network queries can be made.
>>
>> boolean tm_query_net("URL")            # The "tm" is text-mode
>>
>> The configuration function (assumed written in Python) would display 
>> screens to take configuration information (static IP, netmask, hostname, 
>> gateway).  These configuration items would be read from the system 
>> dynamically using ifconfig, svcadm and other commands, and the screens 
>> would be initialized with their information.  After info entry, the 
>> network would then be set up and tested.  The function would throw an 
>> exception on error.
>>
>> tm_net_config()
>>
>> When the DDU needs to make a network query, it could call the query 
>> function first to verify the remote entity is reachable.  If the network 
>> entity is not reachable, the configuration function would be called.  
>> The configuration function is a black box as far as its callers are 
>> concerned.  If for some reason the installer needs arguments passed in 
>> or returned, the DDU can accommodate.
>>
>> Does this sound reasonable?  Have I left anything out?  I welcome 
>> comments, in particular from the Text-mode installer team and the DDU 
>> China team.  Please respond by Weds lunchtime.
>>
>>     Thanks,
>>     Jack
>>     
>
>   


Reply via email to