Skip to content
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

Merged
merged 4 commits into from
Dec 4, 2015

Conversation

dvavili
Copy link
Contributor

@dvavili dvavili commented Dec 3, 2015

  • Added support during delete network and delete tenant
  • Removed unused code/features
  • Using docker swarm socket instead of default unix socket
  • Incorporated previous PR comments
  • Including netctl changes for tenant manipulation

netctl tenant tools usage:
vagrant@netplugin-node1:$ netctl tenant create -p 100.1.0.0/16 -v 2000-2100 -x 12000-12100 tenant1
INFO[0000] Creating tenant: tenant1
vagrant@netplugin-node1:
$ netctl tenant list
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
INFO[0000] Deleting tenant tenant1
vagrant@netplugin-node1:
$ netctl tenant list
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]

- 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
@erikh
Copy link
Contributor

erikh commented Dec 3, 2015

LGTM aside from comments

vlans := ctx.String("vlans")
vxlans := ctx.String("vxlans")

if subnetPool == "" || vlans == "" || vxlans == "" {
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@mapuri
Copy link
Contributor

mapuri commented Dec 3, 2015

LGTM other than some minor comments.

@dvavili
Copy link
Contributor Author

dvavili commented Dec 4, 2015

Looks like the last test case failed because of docker container launch issue...
Is there a way to retrigger the sanity checks without an explicit push

shaleman added a commit that referenced this pull request Dec 4, 2015
…hanges

svcplugin cleanup
Merging this as sanity failure seem to be variation of moby/moby#17879
@shaleman shaleman merged commit e1072fd into contiv:master Dec 4, 2015
@dvavili dvavili deleted the squashed_svcplugin_cleanup_changes branch December 4, 2015 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants