Comment 0 for bug 1526587

Revision history for this message
carl (gsl0610) wrote : Neutron doesn't have a command to show the available ports for one subnet

Neutron doesn't have a command to show the available ports for one subnet.

We can get the available port list with command:
[root@cts-orch ~]# neutron port-list | grep `neutron subnet-show 110-OAM2 | awk '/ id / {print $4}'` | cut -d"|" -f5 | cut -d":" -f3 | sort
 "135.111.122.97"}
 "135.111.122.98"}

But we don't have a command to show the available ports for one subnet. I write a shell script to show the available ports as below, but it will be helpful if we can provide such a neutron command.

[root@cts-orch ~]# ./show_available_ip.sh 110-OAM2
135.111.122.99
135.111.122.100
135.111.122.101
135.111.122.102
135.111.122.103
135.111.122.104
135.111.122.105
135.111.122.106
135.111.122.107
135.111.122.108
135.111.122.109
135.111.122.110
135.111.122.111
135.111.122.112
135.111.122.113
135.111.122.114
135.111.122.115
135.111.122.116
135.111.122.117
135.111.122.118
135.111.122.119
135.111.122.120
135.111.122.121
135.111.122.122
135.111.122.123
135.111.122.124
Total Count: 26