-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
svcplugin cleanup #201
svcplugin cleanup #201
Conversation
- Added support during delete network and delete tenant - Removed unused code/features - Using docker swarm socket instead of default unix socket - Incorporating previous PR comments
LGTM aside from comments |
vlans := ctx.String("vlans") | ||
vxlans := ctx.String("vxlans") | ||
|
||
if subnetPool == "" || vlans == "" || vxlans == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need a check for subnet-len
?
On a related note, may be these validations should be be left to objmodel and it's client interface? May be it is already planned as we are moving towards a shared objmodel with code generation. Just want to confirm my understanding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this should be handled as part of objmodel as well, else the check has to be repeated across all netctl CLI (like create network which uses subnet as well). From what I remember @shaleman was mentioning he was working on sanitizing some of these like making sure the subnets don't overlap across tenants. I'm guessing this will be taken care as part of that.
LGTM other than some minor comments. |
Looks like the last test case failed because of docker container launch issue... |
…hanges svcplugin cleanup Merging this as sanity failure seem to be variation of moby/moby#17879
netctl tenant tools usage:
vagrant@netplugin-node1:
$ netctl tenant create -p 100.1.0.0/16 -v 2000-2100 -x 12000-12100 tenant1$ netctl tenant listINFO[0000] Creating tenant: tenant1
vagrant@netplugin-node1:
Name Subnet Pool Subnet Len vlans vxlans
default 10.1.1.1/16 24 100-1100 1001-1100
tenant1 100.1.0.0/16 24 2000-2100 12000-12100
vagrant@netplugin-node1:
$ netctl tenant delete tenant1$ netctl tenant listINFO[0000] Deleting tenant tenant1
vagrant@netplugin-node1:
Name Subnet Pool Subnet Len vlans vxlans
default 10.1.1.1/16 24 100-1100 1001-1100
Arguments help:
vagrant@netplugin-node1:~$ netctl tenant create -h
NAME:
netctl tenant create - Create a tenant
USAGE:
netctl tenant create [command options] [tenant]
OPTIONS:
--subnet-pool, -p Subnet CIDR - REQUIRED
--subnet-len, -l "24" Subnet length
--vlans, -v Vlan range - REQUIRED
--vxlans, -x Vxlan range - REQUIRED
vagrant@netplugin-node1:~$ netctl tenant list -h
NAME:
netctl tenant list - List tenants
USAGE:
netctl tenant list
vagrant@netplugin-node1:~$ netctl tenant delete -h
NAME:
netctl tenant delete - Delete a tenant
USAGE:
netctl tenant delete [tenant]