Hi Ben, Sure, i will add an option to ls-add itself in v2. I think we should still keep the command to update "type" after ls creation, this will help a user in recovering from wrong config, without a need to recreate an ls.
Thanks Regards, Ankur ________________________________ From: Ben Pfaff <b...@ovn.org> Sent: Monday, November 5, 2018 1:06:20 PM To: Ankur Sharma Cc: ovs-dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH v1 2/3] Vlan Support in ovn, add nbctl commands to set network type On Fri, Oct 26, 2018 at 01:39:43AM +0000, Ankur Sharma wrote: > As a part of proposal for distributed virtual routing > for VLAN networks through OVN, this series has code changes > for Layer 2. > > [1] > https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_pipermail_ovs-2Ddev_2018-2DOctober_353066.html&d=DwIBAg&c=s883GpUCOChKOHiocYtGcg&r=mZwX9gFQgeJHzTg-68aCJgsODyUEVsHGFOfL90J6MJY&m=Fnw2ZktcZAtYq-MFTKAPM0FGVrU7UzqxEaO2UmR0kt8&s=DC310K0duLjK8M2T-mul5cpMRb5MY_s3i_jGkJHzU60&e= > [2] > https://urldefense.proofpoint.com/v2/url?u=https-3A__docs.google.com_document_d_1uoQH478wM1OZ16HrxzbOUvk5LvFnfNEWbkPT6Zmm9OU_edit-3Fusp-3Dsharing&d=DwIBAg&c=s883GpUCOChKOHiocYtGcg&r=mZwX9gFQgeJHzTg-68aCJgsODyUEVsHGFOfL90J6MJY&m=Fnw2ZktcZAtYq-MFTKAPM0FGVrU7UzqxEaO2UmR0kt8&s=vkb-92WAsBxj42rNT-vC2FbcnO_-jPSp0-y-0TcVbPQ&e= > > This Series: > a. Changes in OVN NB Schema to introduce a logical switch type. > b. Changes in ovn-nbctl to configure a logical switch type. > c. Changes in ovn-northd to process and save a logical switch type. > > Adding a logical switch type would be helpful in following: > a. Debugging, since VLAN backed logical switch is dependent on > localnet ports, hence basic validations like localnet port > configured or not etc., can be done with ease. > > b. Helps with Layer 3 implementation > > (https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_pipermail_ovs-2Ddev_2018-2DOctober_353179.html&d=DwIBAg&c=s883GpUCOChKOHiocYtGcg&r=mZwX9gFQgeJHzTg-68aCJgsODyUEVsHGFOfL90J6MJY&m=Fnw2ZktcZAtYq-MFTKAPM0FGVrU7UzqxEaO2UmR0kt8&s=aNkFw9iQxBPAOdB9qsTRtge4ofSDm1I8li3d6LFVvuo&e=). > > This Patch: > a. By default set network_type as overlay during ls_add handling. > > b. Add a new ovn-nbctl command to set network type of a logical > switch. > ovn-nbctl ls-set-network-type LS_NAME vlan|overlay > > c. Display network type along with logical switch, for example: > # ovn-nbctl ls-list > d94d7531-128b-43a2-bff0-56f2aa2ea878 (bar) (type: overlay) > 531e6f24-f6ae-4ea3-856d-ac986f900770 (foo) (type: vlan) > > d. Unit tests to validate this command > > Signed-off-by: Ankur Sharma <ankur.sha...@nutanix.com> Usually I'd expect that the network type would be fixed for a given logical network, rather than changing after it is created. Thus, I'd recommend adding an option to ls-add to specify the network type, rather than a new command. _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev