Hi Syed, We specified storing the DHCP options in the nic_details table as alternatives in the FS. There are however some downsides to this approach:
- Storing each DHCP option as key (=dhcp code),value (=dhcp value) pair: In this case nobody else can use numeric keys in nic_details because they would be "reserved" for DHCP options. Secondly, we would need to retrieve all nic_details (also details non related to DHCP) when listing the DHCP options of a nic. - We could add a prefix like '"dhcp:"' to each DHCP code and use that as a key: Then we could extend the DAO class to include a search criteria which only returns the details starting with a certain prefix (in this example "dhcp:"). - A second option could be that we store all the DHCP options in *one* key,value pair. As key we pick a specific value say; "extra_dhcp_options" and as value: we decode all the dhcp options (code + value) as json. This makes updating DHCP options on a nic more complex. An extra table, specific for DHCP options, seems to be a cleaner way? Kind regards, Sigert *Sigert Goeminne* Software Development Engineer *nuage* <http://nuagenetworks.net>networks.net Copernicuslaan 50 2018 Antwerp Belgium On Wed, Feb 8, 2017 at 3:04 PM, Syed Ahmed <sah...@cloudops.com> wrote: > Hi Sigert, > > Instead of creating a new table `nic_extra_dhcp_option` is it possible to > use the table `nic_options` The *_details tables are usually used as a > key-value store to store details about the various secondary params. You > can have a look at host_details table for example. There is already > boilerplate code (like NicDetailsDao & NicDetailsVO etc) in Cloudstack for > doing this. You could just use that instead. > > On Wed, Feb 8, 2017 at 5:37 AM, Sigert GOEMINNE < > sigert.goemi...@nuagenetworks.net> wrote: > > > All, > > > > We would like to add support for extra DHCP options to Nuage in > CloudStack. > > > > We want to add an extra optional parameter for extra DHCP options to the > > deployVm, updateVM and addNic API, and pass this to the plugin, using a > new > > method on the DHCP Service provider interface. > > > > Please take a look at the FS [1], and jira ticket [2]. > > > > [1] https://cwiki.apache.org/confluence/display/CLOUDSTACK/C > > loudStack+extra+DHCP+option+support > > [2] https://issues.apache.org/jira/browse/CLOUDSTACK-9776 > > > > Kind regards, > > > > *Sigert Goeminne* > > Software Development Engineer > > > > *nuage* <http://nuagenetworks.net>networks.net > > Copernicuslaan 50 > > 2018 Antwerp > > Belgium > > >