How do we set Server name to a node in F5 11.0.0 version Via icontrol
I am trying to set a server name (screen_name) to a node in F5 11.0 via icontrol using LocalLBNodeAddress.set_screen_name() function. I am able to successfully set server name to the node in F5 10 version, the same code is throwing the below error in F5 11.0.
The requested node address (/Common/Svr1) was not found.
I think what you're running into here is a change that occurred in v11. Prior to v11, nodes were referenced by IP address and assigning a screen name was optional. With v11, nodes are referenced by named instead of IP. Both a name and an IP are required to create a node now.
If you notice in the web UI, the 'name' field is not editable when editing a node. In order to rename a node you'll need to save the config (tmsh% save sys config), edit bigip.conf (tmsh% run util bash -c 'vi /config/bigip.conf'), replace the relevant node names, save bigip.conf, and finally load the changes (tmsh% load sys config).
If you want to interact with nodes in v11, the LocalLB::NodeAddressV2 interface is what you want. You can't change the names via iControl however.
I understand that the method set_screen_name has been disabled because it's required at creation, but I don't understand for the "get_screen_name" method.
When you request a pool with "get_member", icontrol answer with IP addresses of the member, and not name. So if you want to identify the name of the node behind a member, you need, I get it well, to make a map of all node with adresses and names to reverse the member.address info.