[Openstack-operators] How to get instance name only by floating ip and then change it to hostname

David Moreau Simard dms at redhat.com
Wed Jun 8 16:30:51 UTC 2016


It doesn't look like the --ip parameter searches through the floating
IPs, that's probably a UX expectation issue and improvement that could
be done to the CLI client.

Something like this should get you what you want:

openstack server set $(openstack server list -f value |awk
'/11.11.111.11/ {print $1}') --name newname

David Moreau Simard
Senior Software Engineer | Openstack RDO

dmsimard = [irc, github, twitter]


On Tue, Jun 7, 2016 at 11:19 AM, OpenStack Mailing List Archive
<corpqa at gmail.com> wrote:
> Link: https://openstack.nimeyo.com/86809/?show=86809#q86809
> From: Wenqi <wehe at redhat.com>
>
> Hi,
> What is the cli to get the instance name only and then change it to
> hostname?
> I know how to get the instance info table from private ip by below command:
> nova list --ip 11.11.111.11
> I just want the name and then use the below command to change it with
> hostname
> nova rename server name
>
>
> _______________________________________________
> OpenStack-operators mailing list
> OpenStack-operators at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>



More information about the OpenStack-operators mailing list