This patch adds a delete cli command to ShareCommands
The helper CLI command checks if service if up. If service
is down, it deletes the share instance
Closes-Bug: #1867030
Change-Id: I6a0575c1ed86213010e50fe1b7a733cdf7fa1736
Manila can now configure a share network with multiple subnets
in an availability zone. Also, it can add a new subnet for an
availability that has share servers, which will triger an update
share server allocations.
Changes:
- API:
- Bump version to 2.70.
- setup share network with multiple subents per az.
- Block manage server with multiple subnets.
- Allow add subnet for in-use share servers.
- `share_network_subnet_id` is dropped from ShareServer view
- `share_network_subnet_ids` is added in ShareServer view
- `network_allocation_update_support` is added to ShareServer and
ShareNetwork views.
- Add a check operation for share network subnet create.
- DB:
- Remove `share_network_subnet_id` from share_servers.
- Create mapping table `share_server_share_network_subnet_mappings`.
- Fix queries with new db design.
- Add migration downgrade and upgrade alembic.
- Add `share_network_subnet_id` to the NetworkAllocations.
- Scheduler:
- Change `AvailabilityZoneFilter` to take in account if the
host supports the allocation required by the setup request.
- Manager:
- Bump RPC API version.
- `_setup_server` allocating multiple subnets.
- Modify signature of driver `_setup_server` interface, passing a
list of `network_info` for each subnet.
- Share server DB creation to inform a list of subnets and
create with `network_allocation_update_support`.
- Implement `check_update_share_server_network_allocations` and
`update_share_server_network_allocations`.
- Drivers:
- For legacy compatibility, all drivers implementing `_setup_server`
consume the first element of the `network_ino`.
- Dummy Driver:
- Implement `_setup_server` with new signature as multiple subnet.
- Modify the `backend_details` to save allocations for all subnets.
- Report update allocation and share server multiple subnet support.
- Implement `check_update_share_server_network_allocations` and
`update_share_server_network_allocations` interfaces.
Signed-off-by: Felipe Rodrigues <felipefuty01@gmail.com>
Co-Authored-By: Andre Beltrami <debeltrami@gmail.com>
Co-Authored-By: Fábio Oliveira <fabioaurelio1269@gmail.com>
Co-Authored-By: Nahim Alves de Souza <nahimsouza@outlook.com>
Co-Authored-By: Caique Mello <caique_mellosbo@hotmail.com>
DocImpact
APIImpact
Partially-Implements: blueprint multiple-share-network-subnets
Change-Id: I7de9de4ae509182e9494bba604979cce03acceec
This is a follow up patch for [1] which removes some unused model
properties and add more unit tests to increase coverage.
[1] https://review.opendev.org/c/openstack/manila/+/774728
Change-Id: I10af132203cb07cea62839014925c7e4c99499e4
Signed-off-by: Douglas Viroel <viroel@gmail.com>
We can also condense this code a bit to allow
adding more resources who have a "host" attribute.
Closes-Bug: #1895323
Change-Id: I5b750217e019b7bc5281006f63feba8fa06db534
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
usage: manila-manage share update_host --currenthost CURRENTHOST
--newhost NEWHOST
[--force FORCE]
--currenthost CURRENTHOST Current share host name.
--newhost NEWHOST New share host name.
--force FORCE Ignore validations.
A fully qualified host string is of the format
'HostA@BackendB#PoolC'. The command allows making
substring modifications to update the host or the
host and backend. To avoid making gratuitous changes,
the complete host string must be specified.
Change-Id: I0f30ab6135c8c438860341cc68b512311e9c4711
oslo.config has deprecated the enforce_type parameter to
set_override() and set its default value to True [1],
so remove this usage from our codebase. Also remove
explict str() cast of mock.sentinel_password in
Windows driver since it should no longer be expected.
[1] Ifa552de0a994e40388cbc9f7dbaa55700ca276b0
Change-Id: Ic02cbb37c6dbf30cacb1e6e290bfb0986f54d5f3
Each config option has limitation for type and value. If we use
method CONF.set_override without parameter enforce_type=True, we
may pass wrong type to config option.
This commit makes sure calling method CONF.set_override with
enforce_type=True.
Change-Id: I700dcd21941c6399c51e11bef2282e1e4565e85a
Closes-Bug: #1517839
Commands "manila-manage service list" and "manila-manage host list"
were displaying availability zone instance instead of its name.
Such bug appeared after implementation of Availability zone model.
So, fix it by providing 'name' field of availability zone model.
Change-Id: I14c3451380df01853183aed265344b1783c95939
Closes-Bug: #1499677
Code from manila/openstack/common/policy.py duplicates code
from oslo_policy, so we remove this module and use oslo_policy instead.
Implements bp use-oslo-policy-lib
Change-Id: I289221a1e96f6c705deef4070be113d69c57f6e0
Manila scripts located in bin/* should be covered with unit tests.
In order to add unit tests for bin/* scripts:
- all
- api
- manage
- scheduler
- share
we move them into manila/cmd and use pbr to setup console scripts
which will call the respective main function of each script under manila/cmd.
It will allow us to import from manila.cmd and individually test each 'main' function.
Add unit tests for manila/cmd/* scripts.
Implements bp unit-tests-for-manila-scripts
Change-Id: I9be6b948a6de7ba76405411e98d7531cf225b57e