Revision history [back]

Usually I do it via neutron database ( may be placed in shell script , just CLI not API )

[root@junoDocker01 ~(keystone_admin)]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 533
Server version: 5.5.40-MariaDB-wsrep MariaDB Server, wsrep_25.11.r4026

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use neutron :
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [neutron]> use neutron ;
Database changed
MariaDB [neutron]> select * from  ipavailabilityranges ;
+--------------------------------------+---------------+---------------+
| allocation_pool_id                   | first_ip      | last_ip       |
+--------------------------------------+---------------+---------------+
| 08591b76-db33-41e2-9fab-0ef067d37280 | 50.0.0.44     | 50.0.0.254    |
| b00d4375-77d2-4f12-800e-96f0b85713c5 | 192.168.1.165 | 192.168.1.254 |
+--------------------------------------+---------------+---------------+
2 rows in set (0.00 sec)

MariaDB [neutron]> update ipavailabilityranges set first_ip='192.168.1.151' 
    -> where allocation_pool_id='b00d4375-77d2-4f12-800e-96f0b85713c5' ;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [neutron]> select * from  ipavailabilityranges ;+--------------------------------------+---------------+---------------+
| allocation_pool_id                   | first_ip      | last_ip       |
+--------------------------------------+---------------+---------------+
| 08591b76-db33-41e2-9fab-0ef067d37280 | 50.0.0.44     | 50.0.0.254    |
| b00d4375-77d2-4f12-800e-96f0b85713c5 | 192.168.1.151 | 192.168.1.254 |
+--------------------------------------+---------------+---------------+
2 rows in set (0.00 sec)

MariaDB [neutron]> commit ;
Query OK, 0 rows affected (0.00 sec)

In your case first_ip='123.30.61.134'

Usually I do it via neutron database ( may be placed in shell script , just CLI not API )

[root@junoDocker01 ~(keystone_admin)]# mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 533
Server version: 5.5.40-MariaDB-wsrep MariaDB Server, wsrep_25.11.r4026

Copyright (c) 2000, 2014, Oracle, Monty Program Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> use neutron :
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [neutron]> use neutron ;
Database changed
MariaDB [neutron]> select * from  ipavailabilityranges ;
+--------------------------------------+---------------+---------------+
| allocation_pool_id                   | first_ip      | last_ip       |
+--------------------------------------+---------------+---------------+
| 08591b76-db33-41e2-9fab-0ef067d37280 | 50.0.0.44     | 50.0.0.254    |
| b00d4375-77d2-4f12-800e-96f0b85713c5 | 192.168.1.165 | 192.168.1.254 |
+--------------------------------------+---------------+---------------+
2 rows in set (0.00 sec)

MariaDB [neutron]> update ipavailabilityranges set first_ip='192.168.1.151' 
    -> where allocation_pool_id='b00d4375-77d2-4f12-800e-96f0b85713c5' ;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

MariaDB [neutron]> select * from  ipavailabilityranges ;+--------------------------------------+---------------+---------------+
;
+--------------------------------------+---------------+---------------+
| allocation_pool_id                   | first_ip      | last_ip       |
+--------------------------------------+---------------+---------------+
| 08591b76-db33-41e2-9fab-0ef067d37280 | 50.0.0.44     | 50.0.0.254    |
| b00d4375-77d2-4f12-800e-96f0b85713c5 | 192.168.1.151 | 192.168.1.254 |
+--------------------------------------+---------------+---------------+
2 rows in set (0.00 sec)

MariaDB [neutron]> commit ;
Query OK, 0 rows affected (0.00 sec)

In your case first_ip='123.30.61.134'