diff --git a/manilaclient/osc/v2/share_networks.py b/manilaclient/osc/v2/share_networks.py index d6a3f5ae3..ef15d1a8c 100644 --- a/manilaclient/osc/v2/share_networks.py +++ b/manilaclient/osc/v2/share_networks.py @@ -295,9 +295,7 @@ class CreateShareNetwork(command.ShowOne): "Availability zone can be specified only with manila API " "version >= 2.51") elif parsed_args.availability_zone: - availability_zone = oscutils.find_resource( - share_client.availability_zones, - parsed_args.availability_zone).name + availability_zone = parsed_args.availability_zone share_network = share_client.share_networks.create( name=parsed_args.name, diff --git a/releasenotes/notes/bug-1962288-fixed-share-network-create-command-879dc3deca131ef9.yaml b/releasenotes/notes/bug-1962288-fixed-share-network-create-command-879dc3deca131ef9.yaml new file mode 100644 index 000000000..f2a26cc3b --- /dev/null +++ b/releasenotes/notes/bug-1962288-fixed-share-network-create-command-879dc3deca131ef9.yaml @@ -0,0 +1,4 @@ +fixes: + - | + Fixed the use of the "--availability-zone" option with the + "openstack share network create" command.