is there a way to rename a storage view via CLI or REST API? Seems easy in the GUI.
background: I work on a procedure where many hosts are being migrated between locations and new storage-views are being created. I just want to save obsolete views under a new name as a fallback precaution.
garyo
89 Posts
1681
0
Posted May 27th, 2014 15:00
Hi Joachim,
Here's instructions on how to change a storage-view name in the CLI:
I have two storage-views on my test system:
VPlexcli:/clusters/cluster-1/exports/storage-views> ls
esx_storage_view federation_storage_view
To change the name (among other properties) you need to use the "::" to set the property:
VPlexcli:/clusters/cluster-1/exports/storage-views> set esx_storage_view:: (Hit tab for tab completions)
esx_storage_view::caw-enabled esx_storage_view::controller-tag
esx_storage_view::initiators esx_storage_view::name
esx_storage_view::operational-status esx_storage_view::port-name-enabled-status
esx_storage_view::ports esx_storage_view::virtual-volumes
esx_storage_view::write-same-16-enabled esx_storage_view::xcopy-enabled
Then set the "name" property:
VPlexcli:/clusters/cluster-1/exports/storage-views> set esx_storage_view::name mynewname
The name's changed:
VPlexcli:/clusters/cluster-1/exports/storage-views> ls
federation_storage_view mynewname
Change it again:
VPlexcli:/clusters/cluster-1/exports/storage-views> set mynewname::name esx_storage_view
VPlexcli:/clusters/cluster-1/exports/storage-views> ls
esx_storage_view federation_storage_view
I don't know what the RESTful API call would be to do that, but perhaps with this information it's simple to do via Rest.
Gary