[Planetlab-devel] Re: API merge between planetlab & onelab
Faiyaz Ahmed
faiyaza at CS.Princeton.EDU
Thu Aug 30 11:17:56 EDT 2007
Hi Thierry,
> This is a hook system, for attaching extra settings (e.g. wireless
> SSID). It is designed after SliceAttributesTypes and SliceAttributes.
> You would first define a NodeNetworkSettingType that denotes wireless
> SSID, and then use it to attach a value to a nodenetwork. I am
> attaching an example.
Is there a NodeManager modification to support this? If so, we should
probably talk about unifying that module as well.
Faiyaz
Thierry Parmentelat wrote:
> Hi Tony Thanks for your interest Please see my answers in the text --
> Thierry
>
>> Keeping AdmGenerateNodeConfFile.py for the time being.
> Fine with me
>> util.py may be used to test the build, but not completely sure.
> I had a closer look, this file (in your cvs only) is a sequel of the
> TestPeers.py stuff, you can safely get rid of it IMO
>> views.sql isn't in our branch.
> right, I screwed up on that one.
>> I plan on adding the db migration scripts functionality you've
>> developed as a means to verify current and future db schema
>> upgrades, but will keep planetlab4.sql schema up to with the
>> changes as well.
> OK, we're in sync here, that's what I've done with planetlab4.sql
>> I will add your GetPlcRelease to the api.
> OK
>> We dont really need NotifySupport.
> We do. Our site registration web page needs to send e-mails to the
> support mailing list.
>> Im not familiar with the NodeNetworkSettings object. Can you give
>> me more info on what you are using it for.
> This is a hook system, for attaching extra settings (e.g. wireless
> SSID). It is designed after SliceAttributesTypes and SliceAttributes.
> You would first define a NodeNetworkSettingType that denotes
> wireless SSID, and then use it to attach a value to a nodenetwork. I
> am attaching an example.
>
> IMPORTANT NOTE. Somehow I forgot to mention
> PLC/Methods/GetBootMedium.py that is a new method on our side Right
> now our web pages use exclusively this method rather that the former
> AdmGenerateNodeConfFile For some reason your web pages currently seem
> to bypass this API call and directly invoke bootcustom.sh, I have no
> clue why, but in any case if we are to merge this method is of vital
> interest to us.
>> ========== Most problematic: PLC/NodeNetworks.py
> We use a view rather than a table for fetching these objects now
> because of nodenetwork settings - we need a means to compute
> nodenetworks_setting_ids
>> ---------- PLC/Methods/BootUpdateNode.py attach event to node - not
>> sure that's still useful
>>
>>
>> No need to explicitly attach an event to this call because the
>> node_id of the node making the call is stored in Events.node_id
>> (this is true for all the Boot... calls). BTW until all boot called
>> were logged in the api even when api call logging (debug mode) was
>> turned off. Now, these boot calls are only logged if they produce
>> an error (just like every other call).
> OK I've rolled back this change, we're in sync on that file. This
> probably raises more questions on our side about the general topic
> "how to use events from the web pages" but that's another story. I'll
> check how our events web page behaves with this merged API and will
> come back to you guys if needed.
>>
>> PLC/Nodes.py last_contact : I have commented this out - cannot
>> remember why I should probably have re-enabled it, your
>> feedback is appreciated
> OK I'm back with last_contact enabled
>> I have some other minor questions/comments. Ill catch you sometime
>> online
> you're welcome
>
>
> ------------------------------------------------------------------------
>
>
>>>> # list the node network settings currently available for nnst
>>>> in
>>>> GetNodeNetworkSettingTypes({},['category','name','description']):
>>>>
> ... print nnst ... {'category': u'wlan', 'name': u'channel',
> 'description': u'Wifi Channel'} {'category': u'general', 'name':
> u'interface_name', 'description': u'custom interface name'}
> {'category': u'wlan', 'name': u'ssid', 'description': u'Wifi ESSID'}
>
>
>>>> # fetch a given node's nodenetworks
>>>> GetNodes('galileo.inria.fr')[0]['nodenetwork_ids']
> [28, 29]
>>>> # or locate a nodenetwork from its ip address GetNodeNetworks(
>>>>
> {'ip':'138.96.250.50'},['nodenetwork_id']) [ {'nodenetwork_id': 29}]
>
>
>>>> # inspect current settings on nodenetwork 29 for nns in
>>>> GetNodeNetworkSettings(
> {'nodenetwork_id':29},\ ['category','name','description','value']):
> ... print nns ... {'category': u'wlan', 'name': u'ssid', 'value':
> u'onelab-g', 'description': u'Wifi ESSID'}
>
>>>> # Create a new setting type AddNodeNetworkSettingType(
>>>> {'category':'general','min_role_id':20,\
> 'name':'driver', 'description':'allows to specify the Linux driver to
> use' })
>
>>>> # retrieve it GetNodeNetworkSettingTypes( {'name':'driver'})
> [ {'category': u'general', 'nodenetwork_setting_type_id': 5,
> 'min_role_id': 20, \ 'name': u'driver', 'description': u'allows to
> specify the Linux driver to use' }]
>
>>>> # set a value for this setting type on the 29 network interface
>>>> AddNodeNetworkSetting(29,'driver','ath_pci')
> 13
>
>>>> # inspect again nodenetwork 29 for nns in
>>>> GetNodeNetworkSettings( {'nodenetwork_id':29},
>>>> ['category','name','value']):
> ... print nns ... {'category': u'wlan', 'name': u'ssid', 'value':
> u'onelab-g'} {'category': u'general', 'name': u'driver', 'value':
> u'ath_pci'}
>
>>>> # fetch ids for deletion for nns in GetNodeNetworkSettings(
>>>> {'nodenetwork_id':29},['name','nodenetwork_setting_id']):
> ... print nns ... {'name': u'ssid', 'nodenetwork_setting_id': 12}
> {'name': u'driver', 'nodenetwork_setting_id': 13}
>
>>>> # delete the setting DeleteNodeNetworkSetting(13)
> 1
>
>>>> # inspect again nodenetwork 29 for nns in
>>>> GetNodeNetworkSettings(
> {'nodenetwork_id':29},['category','name','value']): ... print nns ...
> {'category': u'wlan', 'name': u'ssid', 'value': u'onelab-g'}
>
>
> ------------------------------------------------------------------------
>
>
> _______________________________________________ Devel mailing list
> Devel at lists.planet-lab.org
> https://lists.planet-lab.org/mailman/listinfo/devel
More information about the Devel
mailing list