python-watcher 13.0.0__py3-none-any.whl → 13.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. {python_watcher-13.0.0.dist-info → python_watcher-13.1.0.dist-info}/AUTHORS +3 -0
  2. {python_watcher-13.0.0.dist-info → python_watcher-13.1.0.dist-info}/METADATA +47 -49
  3. {python_watcher-13.0.0.dist-info → python_watcher-13.1.0.dist-info}/RECORD +27 -27
  4. {python_watcher-13.0.0.dist-info → python_watcher-13.1.0.dist-info}/WHEEL +1 -1
  5. {python_watcher-13.0.0.dist-info → python_watcher-13.1.0.dist-info}/entry_points.txt +0 -1
  6. python_watcher-13.1.0.dist-info/pbr.json +1 -0
  7. watcher/applier/actions/volume_migration.py +26 -72
  8. watcher/common/context.py +3 -0
  9. watcher/common/keystone_helper.py +0 -34
  10. watcher/common/utils.py +1 -7
  11. watcher/db/sqlalchemy/alembic/env.py +2 -2
  12. watcher/db/sqlalchemy/api.py +89 -106
  13. watcher/db/sqlalchemy/migration.py +3 -3
  14. watcher/db/sqlalchemy/models.py +0 -8
  15. watcher/decision_engine/audit/continuous.py +1 -1
  16. watcher/decision_engine/strategy/strategies/zone_migration.py +25 -30
  17. watcher/tests/applier/actions/test_volume_migration.py +30 -39
  18. watcher/tests/db/base.py +13 -11
  19. watcher/tests/decision_engine/audit/test_audit_handlers.py +7 -7
  20. watcher/tests/decision_engine/strategy/strategies/test_zone_migration.py +4 -1
  21. python_watcher-13.0.0.dist-info/pbr.json +0 -1
  22. {python_watcher-13.0.0.data → python_watcher-13.1.0.data}/data/etc/apache2/watcher +0 -0
  23. {python_watcher-13.0.0.data → python_watcher-13.1.0.data}/data/etc/watcher/README-watcher.conf.txt +0 -0
  24. {python_watcher-13.0.0.data → python_watcher-13.1.0.data}/data/etc/watcher/oslo-config-generator/watcher.conf +0 -0
  25. {python_watcher-13.0.0.data → python_watcher-13.1.0.data}/data/etc/watcher/oslo-policy-generator/watcher-policy-generator.conf +0 -0
  26. {python_watcher-13.0.0.data → python_watcher-13.1.0.data}/scripts/watcher-api-wsgi +0 -0
  27. {python_watcher-13.0.0.dist-info → python_watcher-13.1.0.dist-info}/LICENSE +0 -0
  28. {python_watcher-13.0.0.dist-info → python_watcher-13.1.0.dist-info}/top_level.txt +0 -0
@@ -28,6 +28,7 @@ Dao Cong Tien <tiendc@vn.fujitsu.com>
28
28
  Darren Shaw <ds354m@att.com>
29
29
  David TARDIVEL <David.TARDIVEL@b-com.com>
30
30
  Doug Hellmann <doug@doughellmann.com>
31
+ Douglas Viroel <viroel@gmail.com>
31
32
  Drew Thorstensen <thorst@us.ibm.com>
32
33
  Edwin Zhai <edwin.zhai@intel.com>
33
34
  Egor Panfilov <erakli00@gmail.com>
@@ -82,6 +83,7 @@ Ralf Rantzau <rrantzau@cisco.com>
82
83
  Sampath Priyankara <sam47priya@gmail.com>
83
84
  Santhosh Fernandes <santhosh.fernandes@gmail.com>
84
85
  Sean McGinnis <sean.mcginnis@gmail.com>
86
+ Sean Mooney <work@seanmooney.info>
85
87
  ShangXiao <shangxiaobj@inspur.com>
86
88
  Steve Kowalik <steven@wedontsleep.org>
87
89
  Steve Wilkerson <sw5822@att.com>
@@ -94,6 +96,7 @@ Tatiana Kholkina <holkina@selectel.ru>
94
96
  Taylor Peoples <tpeoples@us.ibm.com>
95
97
  Thierry Carrez <thierry@openstack.org>
96
98
  Tin Lam <tl3438@att.com>
99
+ Tobias Urdin <tobias.urdin@binero.com>
97
100
  Tobias Urdin <tobias.urdin@binero.se>
98
101
  Tomasz Kaczynski <tomasz.kaczynski@intel.com>
99
102
  Tomasz Trębski <tomasz.trebski@ts.fujitsu.com>
@@ -1,12 +1,10 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-watcher
3
- Version: 13.0.0
3
+ Version: 13.1.0
4
4
  Summary: OpenStack Watcher provides a flexible and scalable resource optimization service for multi-tenant OpenStack-based clouds.
5
5
  Home-page: https://docs.openstack.org/watcher/latest/
6
6
  Author: OpenStack
7
7
  Author-email: openstack-discuss@lists.openstack.org
8
- License: UNKNOWN
9
- Platform: UNKNOWN
10
8
  Classifier: Environment :: OpenStack
11
9
  Classifier: Intended Audience :: Information Technology
12
10
  Classifier: Intended Audience :: System Administrators
@@ -21,50 +19,52 @@ Classifier: Programming Language :: Python :: 3.9
21
19
  Classifier: Programming Language :: Python :: 3.10
22
20
  Classifier: Programming Language :: Python :: 3.11
23
21
  Requires-Python: >=3.8
24
- Requires-Dist: PasteDeploy (>=1.5.2)
25
- Requires-Dist: PrettyTable (>=0.7.2)
26
- Requires-Dist: SQLAlchemy (>=1.2.5)
27
- Requires-Dist: WSME (>=0.9.2)
28
- Requires-Dist: WebOb (>=1.8.5)
29
- Requires-Dist: apscheduler (>=3.5.1)
30
- Requires-Dist: croniter (>=0.3.20)
31
- Requires-Dist: futurist (>=1.8.0)
32
- Requires-Dist: gnocchiclient (>=7.0.1)
33
- Requires-Dist: jsonpatch (>=1.21)
34
- Requires-Dist: jsonschema (>=3.2.0)
35
- Requires-Dist: keystoneauth1 (>=3.4.0)
36
- Requires-Dist: keystonemiddleware (>=4.21.0)
37
- Requires-Dist: lxml (>=4.5.1)
38
- Requires-Dist: microversion-parse (>=0.2.1)
39
- Requires-Dist: networkx (>=2.4)
40
- Requires-Dist: os-resource-classes (>=0.4.0)
41
- Requires-Dist: oslo.cache (>=1.29.0)
42
- Requires-Dist: oslo.concurrency (>=3.26.0)
43
- Requires-Dist: oslo.config (>=6.8.0)
44
- Requires-Dist: oslo.context (>=2.21.0)
45
- Requires-Dist: oslo.db (>=4.44.0)
46
- Requires-Dist: oslo.i18n (>=3.20.0)
47
- Requires-Dist: oslo.log (>=3.37.0)
48
- Requires-Dist: oslo.messaging (>=14.1.0)
49
- Requires-Dist: oslo.policy (>=3.6.0)
50
- Requires-Dist: oslo.reports (>=1.27.0)
51
- Requires-Dist: oslo.serialization (>=2.25.0)
52
- Requires-Dist: oslo.service (>=1.30.0)
53
- Requires-Dist: oslo.upgradecheck (>=1.3.0)
54
- Requires-Dist: oslo.utils (>=3.36.0)
55
- Requires-Dist: oslo.versionedobjects (>=1.32.0)
56
- Requires-Dist: pbr (>=3.1.1)
57
- Requires-Dist: pecan (>=1.3.2)
58
- Requires-Dist: python-cinderclient (>=3.5.0)
59
- Requires-Dist: python-glanceclient (>=2.9.1)
60
- Requires-Dist: python-ironicclient (>=2.5.0)
61
- Requires-Dist: python-keystoneclient (>=3.15.0)
62
- Requires-Dist: python-monascaclient (>=1.12.0)
63
- Requires-Dist: python-neutronclient (>=6.7.0)
64
- Requires-Dist: python-novaclient (>=14.1.0)
65
- Requires-Dist: python-openstackclient (>=3.14.0)
66
- Requires-Dist: stevedore (>=1.28.0)
67
- Requires-Dist: taskflow (>=3.8.0)
22
+ License-File: LICENSE
23
+ License-File: AUTHORS
24
+ Requires-Dist: apscheduler >=3.5.1
25
+ Requires-Dist: jsonpatch >=1.21
26
+ Requires-Dist: keystoneauth1 >=3.4.0
27
+ Requires-Dist: jsonschema >=3.2.0
28
+ Requires-Dist: keystonemiddleware >=4.21.0
29
+ Requires-Dist: lxml >=4.5.1
30
+ Requires-Dist: croniter >=0.3.20
31
+ Requires-Dist: os-resource-classes >=0.4.0
32
+ Requires-Dist: oslo.concurrency >=3.26.0
33
+ Requires-Dist: oslo.cache >=1.29.0
34
+ Requires-Dist: oslo.config >=6.8.0
35
+ Requires-Dist: oslo.context >=2.21.0
36
+ Requires-Dist: oslo.db >=4.44.0
37
+ Requires-Dist: oslo.i18n >=3.20.0
38
+ Requires-Dist: oslo.log >=3.37.0
39
+ Requires-Dist: oslo.messaging >=14.1.0
40
+ Requires-Dist: oslo.policy >=3.6.0
41
+ Requires-Dist: oslo.reports >=1.27.0
42
+ Requires-Dist: oslo.serialization >=2.25.0
43
+ Requires-Dist: oslo.service >=1.30.0
44
+ Requires-Dist: oslo.upgradecheck >=1.3.0
45
+ Requires-Dist: oslo.utils >=3.36.0
46
+ Requires-Dist: oslo.versionedobjects >=1.32.0
47
+ Requires-Dist: PasteDeploy >=1.5.2
48
+ Requires-Dist: pbr >=3.1.1
49
+ Requires-Dist: pecan >=1.3.2
50
+ Requires-Dist: PrettyTable >=0.7.2
51
+ Requires-Dist: gnocchiclient >=7.0.1
52
+ Requires-Dist: python-cinderclient >=3.5.0
53
+ Requires-Dist: python-glanceclient >=2.9.1
54
+ Requires-Dist: python-keystoneclient >=3.15.0
55
+ Requires-Dist: python-monascaclient >=1.12.0
56
+ Requires-Dist: python-neutronclient >=6.7.0
57
+ Requires-Dist: python-novaclient >=14.1.0
58
+ Requires-Dist: python-openstackclient >=3.14.0
59
+ Requires-Dist: python-ironicclient >=2.5.0
60
+ Requires-Dist: SQLAlchemy >=1.2.5
61
+ Requires-Dist: stevedore >=1.28.0
62
+ Requires-Dist: taskflow >=3.8.0
63
+ Requires-Dist: WebOb >=1.8.5
64
+ Requires-Dist: WSME >=0.9.2
65
+ Requires-Dist: networkx >=2.4
66
+ Requires-Dist: microversion-parse >=0.2.1
67
+ Requires-Dist: futurist >=1.8.0
68
68
 
69
69
  =======
70
70
  Watcher
@@ -96,5 +96,3 @@ migration, increased energy efficiency and more!
96
96
  * Release notes: https://docs.openstack.org/releasenotes/watcher/
97
97
  * Design specifications: https://specs.openstack.org/openstack/watcher-specs/
98
98
 
99
-
100
-
@@ -1,8 +1,8 @@
1
- python_watcher-13.0.0.data/data/etc/apache2/watcher,sha256=urybYUTb0kAVIvbm4WK5oDfXR82QSK2lyMl4Z9dCz4Q,1190
2
- python_watcher-13.0.0.data/data/etc/watcher/README-watcher.conf.txt,sha256=EIa_sjXDyl1XSg0ovsFwUjqw0euS0N2PYn4HtyBGJME,131
3
- python_watcher-13.0.0.data/data/etc/watcher/oslo-config-generator/watcher.conf,sha256=O7g1DZqgXvbQgkBfot0dR1ar1d-3SBkOU_ZK4Dz7SFc,406
4
- python_watcher-13.0.0.data/data/etc/watcher/oslo-policy-generator/watcher-policy-generator.conf,sha256=ZfIuVdtrj7IZm2BrRQvAW3JOL_kqCiILf-vBmwX3ufw,76
5
- python_watcher-13.0.0.data/scripts/watcher-api-wsgi,sha256=YcIpUO3iRVW6Fu3Md_ooAeHkmJJasG031naMdf8cv2A,1829
1
+ python_watcher-13.1.0.data/data/etc/apache2/watcher,sha256=urybYUTb0kAVIvbm4WK5oDfXR82QSK2lyMl4Z9dCz4Q,1190
2
+ python_watcher-13.1.0.data/data/etc/watcher/README-watcher.conf.txt,sha256=EIa_sjXDyl1XSg0ovsFwUjqw0euS0N2PYn4HtyBGJME,131
3
+ python_watcher-13.1.0.data/data/etc/watcher/oslo-config-generator/watcher.conf,sha256=O7g1DZqgXvbQgkBfot0dR1ar1d-3SBkOU_ZK4Dz7SFc,406
4
+ python_watcher-13.1.0.data/data/etc/watcher/oslo-policy-generator/watcher-policy-generator.conf,sha256=ZfIuVdtrj7IZm2BrRQvAW3JOL_kqCiILf-vBmwX3ufw,76
5
+ python_watcher-13.1.0.data/scripts/watcher-api-wsgi,sha256=YcIpUO3iRVW6Fu3Md_ooAeHkmJJasG031naMdf8cv2A,1829
6
6
  watcher/__init__.py,sha256=Vs2olXPZ_IAV1rukHYRl3ITzYFBNXX9mIUtFXkMWYwg,640
7
7
  watcher/_i18n.py,sha256=-25OcpwjDCiYdFIUJh86S7Sg0fs3wMIIjEreaGUyCyY,1295
8
8
  watcher/version.py,sha256=3bUsLHmwjNgOJ9hfzy5yQ67UGFOriUNFJqyh8lGQazE,760
@@ -56,7 +56,7 @@ watcher/applier/actions/migration.py,sha256=qSCBX7DILKb9f5215THvX29m7xdAMSG3AeNq
56
56
  watcher/applier/actions/nop.py,sha256=GkBGxgHNron_NzM8GK3sDGrBdSZLn4RUJUWaZXmVtTE,1877
57
57
  watcher/applier/actions/resize.py,sha256=J41-YLElaBhUsQsKq9o8pxLyAfw378PgVUMkGN-KUNI,3379
58
58
  watcher/applier/actions/sleep.py,sha256=ZroXYp1-yzVIrpDY-C8coeNdts2b54kWDkRQworDMj4,2024
59
- watcher/applier/actions/volume_migration.py,sha256=-GvmGOcAFOqZo6O94X1FOiFWlGmtWKcJY_ZXk8f5DrE,8523
59
+ watcher/applier/actions/volume_migration.py,sha256=EJ1yifdydE0nQQ0C7XlQKWDVU1F8wtw_BpZRCyGZY28,7317
60
60
  watcher/applier/loading/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
61
61
  watcher/applier/loading/default.py,sha256=a0xsq266BlNxXXbtQlkszD2QJzHES5nGfmXvlF1GiDs,946
62
62
  watcher/applier/messaging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -75,10 +75,10 @@ watcher/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
75
75
  watcher/common/cinder_helper.py,sha256=WurmDVm4JzYyU-yn4HcleJ9JwduIc76rr9XBhFgMwO0,9599
76
76
  watcher/common/clients.py,sha256=H1i8WyQ0r-8HuXYRePBvnrvJd0ehRNFjQFmZQ2dUbjY,12751
77
77
  watcher/common/config.py,sha256=2_9hklnzAICpZAIDQmxoE8d8qMFS03sjkoVdXPLchmU,1465
78
- watcher/common/context.py,sha256=SAxWJSopUogTMC2hAwLa6vK_Ra_Etk5V8CcDf4tgb-I,4555
78
+ watcher/common/context.py,sha256=045ss7dk3LU_D-c9jHloMG2YL4CR-EJGXIAfAy9SEs0,4643
79
79
  watcher/common/exception.py,sha256=QoxjeIWLyXdzbkePyE_vvZzUllb0_OP3eEgxRDxd72o,14304
80
80
  watcher/common/ironic_helper.py,sha256=Uw21GnwJHScDPbjiHfou9ZrKIkVF0hgsoVikJBoGPNw,1609
81
- watcher/common/keystone_helper.py,sha256=kxEgRrdYY64CqJ_9g_FazwQH-Or3qoXyT9LIMzWvi4s,4487
81
+ watcher/common/keystone_helper.py,sha256=nTkJx9fJsc0CDsZmaXfVeUqIo22-haUCcyXw1ByDZXg,3342
82
82
  watcher/common/nova_helper.py,sha256=UeXPu9u6XOdOebkOjmfdhfw7OBoaqce5YPhKUeTe6XQ,29807
83
83
  watcher/common/paths.py,sha256=QIHaSfIR7SExS6ecyqD24iCdkiXIxDk6FopCVF9ijho,1178
84
84
  watcher/common/placement_helper.py,sha256=jo9Ksofh7AGd8rLFsib-cF1kRocP05-trpJOxdM_do0,6652
@@ -87,7 +87,7 @@ watcher/common/rpc.py,sha256=X1ZEohTH6Maw_iZaj9JBDAD_sfUPzV35W4lCeJhRITc,4415
87
87
  watcher/common/scheduling.py,sha256=jx-kfyzhHZfwdanXBaVwhrPkvqer9mZJnT_v4vTdcMY,2145
88
88
  watcher/common/service.py,sha256=FvkphJ3RW9l8Xp1_GRTz1P__BPEQsU78mDNt3z4dyTs,9715
89
89
  watcher/common/service_manager.py,sha256=XT_4JmmsthD1NaAbQdk501PIiyr_BflC_UYpSoYvqz0,1337
90
- watcher/common/utils.py,sha256=Fmq9ynz2QjJcqnJmvS8IdrvBI98Rt_XAYHUMnw-ZXsk,6190
90
+ watcher/common/utils.py,sha256=PCPgzMtVfZR9613P7guKv1DJljK_4e0TbW7LgMXmwcg,6038
91
91
  watcher/common/loader/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
92
92
  watcher/common/loader/base.py,sha256=SeI1QVtA11JcQcC8jRxfOraQ9D2WTUdSZv3zAou47Us,842
93
93
  watcher/common/loader/default.py,sha256=P-HZM7wJbQFfNrGSAzZnHj-3t3a6NVx9dQl3dUvawFc,3076
@@ -142,12 +142,12 @@ watcher/db/migration.py,sha256=luOV_QnQp1XvtKFrgIMmrn7NFPbOgIcDxOBDQt5wVzE,1636
142
142
  watcher/db/purge.py,sha256=cqC37xAcb18pEAdneQUcHdLMv8ZpC6FCS2iKr-CNmAQ,16858
143
143
  watcher/db/sqlalchemy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
144
144
  watcher/db/sqlalchemy/alembic.ini,sha256=LzCgKVKhFQctG7OUdDzWHGKnwA7WkTCLame3foHscuE,975
145
- watcher/db/sqlalchemy/api.py,sha256=oFTonnHfPQ38NIRqoBgPs1J7OB1BW1qdjFrrMNJz_KE,44371
145
+ watcher/db/sqlalchemy/api.py,sha256=GhpRkhKA5ZPl2tWYqs54wz7982zMWYChtJZgGaJGQEk,44309
146
146
  watcher/db/sqlalchemy/job_store.py,sha256=LTRYP2pq5Lhkpuk9Bl20QZlxdaddA-GicEOT8uW-IPo,5407
147
- watcher/db/sqlalchemy/migration.py,sha256=VNPXd-8i3ib5Cqq43uAQegwYiuWREZnHvmJCEmnErAo,3676
148
- watcher/db/sqlalchemy/models.py,sha256=738iG47Amlb-QXpJhrNwpquQmjxIC-lqhOPaWa1ZTq8,10945
147
+ watcher/db/sqlalchemy/migration.py,sha256=PWbY56-ENp7L7_Fmg1_05TPSi8rBboGLGNokzGbYQrQ,3692
148
+ watcher/db/sqlalchemy/models.py,sha256=smIrTRPtYez2WweB_lJegUK3sPX8eid8hTSOYnKzO9s,10739
149
149
  watcher/db/sqlalchemy/alembic/README.rst,sha256=iME9Yux4ZAcstexKFPsv_g4fpdaarKcvtscInoAvKTU,1942
150
- watcher/db/sqlalchemy/alembic/env.py,sha256=D3nplgyG_dO0ikfBWhdDyBDZAYSY43kB-B88CcgeRMI,1769
150
+ watcher/db/sqlalchemy/alembic/env.py,sha256=Z64jH9zzwGd_7XMoOxIW7fbV4xfzMzW3etHHfFJ6Z1I,1774
151
151
  watcher/db/sqlalchemy/alembic/script.py.mako,sha256=D8kFI44_9vBJZrAYSkZxDTX2-S5Y-oEetEd9BKlo9S8,412
152
152
  watcher/db/sqlalchemy/alembic/versions/001_ocata.py,sha256=8ulT2iVUMn95fwLzeSrLfOYkwxaEOiBK26DVNMiUOM0,9500
153
153
  watcher/db/sqlalchemy/alembic/versions/0f6042416884_add_apscheduler_jobs.py,sha256=El0qEzHBFJVUKffmBnj84OPRdrh2dfT036Z9LBGzQ1s,1145
@@ -167,7 +167,7 @@ watcher/decision_engine/sync.py,sha256=113TXr2kBqX5HV6VsbMQJn7V1j5GzA74DE8j-TplS
167
167
  watcher/decision_engine/threading.py,sha256=k_ld56LT-ZzFmEBQvTqsCb0PnZUItUk1ZzVPRiwu4v0,3811
168
168
  watcher/decision_engine/audit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
169
169
  watcher/decision_engine/audit/base.py,sha256=AMcGSM04bM__BIeP5-Kf7nfPdmMX4WqsTO_Gpz7--X8,5669
170
- watcher/decision_engine/audit/continuous.py,sha256=8s8x0km844W7RLMcqwrCzOY3rAstN352fU8eAePDqYU,9490
170
+ watcher/decision_engine/audit/continuous.py,sha256=gEL4SBSMA6xFmRQkxkwU1V4X5orzjs970NxvgJhmqYk,9510
171
171
  watcher/decision_engine/audit/event.py,sha256=TQNiPB806LhrxXtBZMz69qGKOFW2mZZ6zXXv4xoStrk,1049
172
172
  watcher/decision_engine/audit/oneshot.py,sha256=hbcAofXAVEjC5HWJpKq8y1AEKuyFjk33nP1JD5Nc_ps,1046
173
173
  watcher/decision_engine/datasources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -262,7 +262,7 @@ watcher/decision_engine/strategy/strategies/uniform_airflow.py,sha256=8jaW5LGkM9
262
262
  watcher/decision_engine/strategy/strategies/vm_workload_consolidation.py,sha256=-usWMjqFcbTSWbGKNmsSlZ-0wnMNwLv2w22Fu6nIqyw,27190
263
263
  watcher/decision_engine/strategy/strategies/workload_balance.py,sha256=MMJZkfi8kFJDT4Hcp-NTCclN1MMKj02t88OdMinWYnI,14333
264
264
  watcher/decision_engine/strategy/strategies/workload_stabilization.py,sha256=xKnjDeSAkGxvAuUKlxRGuaHVyBjSy-1nFcgI4ni8pnk,24902
265
- watcher/decision_engine/strategy/strategies/zone_migration.py,sha256=bNKarllyWVgtNMSIzckV2C4I9IFjQPHfgqdTiOTvEes,33189
265
+ watcher/decision_engine/strategy/strategies/zone_migration.py,sha256=y7_mrpDvrX8L41Ec-7dGnb3Ej7oFxKlSAK6Q0d_-vwk,32791
266
266
  watcher/hacking/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
267
267
  watcher/hacking/checks.py,sha256=Zi5E5T8S-su50FyYHVD5nv4H0qujObea1gbN7ZpdSGc,10378
268
268
  watcher/locale/de/LC_MESSAGES/watcher.po,sha256=vOjcLhUBkLGDZ2Q5kM4e4SqlNuS_LY8zXgX9Ib4aPDA,26447
@@ -333,7 +333,7 @@ watcher/tests/applier/actions/test_change_nova_service_state.py,sha256=DnA-nUo4p
333
333
  watcher/tests/applier/actions/test_migration.py,sha256=_1squ_q5oZVRFtl3y7WLbFUFOGVjkL2CXR5Ayy2tSsk,8654
334
334
  watcher/tests/applier/actions/test_resize.py,sha256=L0fV24QS7sAibgVh5WmwIpywby3RKcjFEu6yQYBA7o8,3470
335
335
  watcher/tests/applier/actions/test_sleep.py,sha256=P5arZUQvFHQwjv739QogQ6kRAIXPHnbDJqAs68VaBas,1637
336
- watcher/tests/applier/actions/test_volume_migration.py,sha256=o5EwWIrSmsnVwn3bd43ec6JFvopycOQwMLDioIFGeH0,8973
336
+ watcher/tests/applier/actions/test_volume_migration.py,sha256=gw6rWRWoP09gF1-BCHjCfakSc_Yq5hLbcsOr1h3gyIw,8639
337
337
  watcher/tests/applier/actions/loading/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
338
338
  watcher/tests/applier/actions/loading/test_default_actions_loader.py,sha256=p590vgsqMz1wwXnXHNruIAO0APqFV6IMtqajo4fPT_E,1109
339
339
  watcher/tests/applier/messaging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -367,7 +367,7 @@ watcher/tests/common/metal_helper/test_maas.py,sha256=SrPJ7Jbr8UtRsQDRodDtfLHf0R
367
367
  watcher/tests/conf/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
368
368
  watcher/tests/conf/test_list_opts.py,sha256=A9mqxfT1Be4zrJvGnAP_yb4A4jZBSzYQ5IDbFuIQMZM,7028
369
369
  watcher/tests/db/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
370
- watcher/tests/db/base.py,sha256=sWRSa6Va4j-Y4qj-JvP3s0V-23bONqlptgxTxK3G8uk,2588
370
+ watcher/tests/db/base.py,sha256=dozOSdJUXuqBagJhEzxI7Kuf6X_4935NQTo1NgtWUes,2680
371
371
  watcher/tests/db/test_action.py,sha256=irA0sIotRD88tIL45SaVyYW1-hhJqFK1ml-waQZDGxM,15255
372
372
  watcher/tests/db/test_action_description.py,sha256=tgh5CSrxh2lj99CBZ661Zcmom4NZ11RxWtGtYfSDDyU,11274
373
373
  watcher/tests/db/test_action_plan.py,sha256=dw4PM81aINWnUAwJg1bkWZVa1bT2JGJQl9Bld0gpBUU,15616
@@ -389,7 +389,7 @@ watcher/tests/decision_engine/test_rpcapi.py,sha256=H6oHI97HfJCoxuF5omHDdY4Kn5ko
389
389
  watcher/tests/decision_engine/test_scheduling.py,sha256=6txr8Sdx2xC4AeEthz7oEgFFEOm0ti8C8hyukVUrUDQ,5376
390
390
  watcher/tests/decision_engine/test_sync.py,sha256=Z9tD0tPopXIIZyxkOfYtJRWtZBBVsLdeeGMmvoFXFcE,30575
391
391
  watcher/tests/decision_engine/audit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
392
- watcher/tests/decision_engine/audit/test_audit_handlers.py,sha256=wPhEHjDz_lU7vPqZUY70NEWVRF1LSeiuqTDbDeGd8_A,24158
392
+ watcher/tests/decision_engine/audit/test_audit_handlers.py,sha256=vklPtgSME2jgGXlJZSX4_QlS3Lxbgv_uLgpgAOY3NNk,24298
393
393
  watcher/tests/decision_engine/cluster/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
394
394
  watcher/tests/decision_engine/cluster/test_cinder_cdmc.py,sha256=GNuklAX_ncDJPlvUZw7E07DajLYlCKcylIX5qzEA_Ho,5280
395
395
  watcher/tests/decision_engine/cluster/test_cluster_data_model_collector.py,sha256=vb7bHzeJWe8S7JQkQfXRlOMZDmD1hPZlRnTzbDSY1Jw,3034
@@ -523,7 +523,7 @@ watcher/tests/decision_engine/strategy/strategies/test_uniform_airflow.py,sha256
523
523
  watcher/tests/decision_engine/strategy/strategies/test_vm_workload_consolidation.py,sha256=8Rq_-6Qy7D0OlxAvUhojVFz7GOPrHlI2aoYSwF5EVjs,19358
524
524
  watcher/tests/decision_engine/strategy/strategies/test_workload_balance.py,sha256=76Gnxfg_T8YMI26XWGvguAd7Eiix4tL5AOTyIWXJKaY,6279
525
525
  watcher/tests/decision_engine/strategy/strategies/test_workload_stabilization.py,sha256=_5GvZZZKcmMFsf6UMmJX_cYD5wCJV0lbP4Y2Kd4PuzM,12007
526
- watcher/tests/decision_engine/strategy/strategies/test_zone_migration.py,sha256=HVDn6i3ayCJjEkPwifi_8u2hekuNyrU-jyCucp8kzoc,30679
526
+ watcher/tests/decision_engine/strategy/strategies/test_zone_migration.py,sha256=Fbz-iXTDx_7-LfSWV3Wys1jp_6Gv8nJZOKHLcAUQWAc,30829
527
527
  watcher/tests/notifications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
528
528
  watcher/tests/notifications/test_action_notification.py,sha256=sR7ES_GhCdUUY3a6S2ta8imRQ69r2yMEX78QngxfHSA,22457
529
529
  watcher/tests/notifications/test_action_plan_notification.py,sha256=vSr04aG3XsitWvu_nEFttBwqrJDzCnfUIjQrVdb0c9w,28848
@@ -543,11 +543,11 @@ watcher/tests/objects/test_scoring_engine.py,sha256=y_crleFQFOUKrqT9tSI1NIP7eEMs
543
543
  watcher/tests/objects/test_service.py,sha256=w8r6qgLJd0Vp3B774BInkWij4qUbMiykisIRSaxiqaA,5100
544
544
  watcher/tests/objects/test_strategy.py,sha256=WoJYFQD0LU7vkUT2MMy1bx3S6eY458aTICjoGRiPccI,7364
545
545
  watcher/tests/objects/utils.py,sha256=WtBFlXWIBRvl1keAjz1GtrkUWppil2pFIA-RngcqA5c,8058
546
- python_watcher-13.0.0.dist-info/AUTHORS,sha256=8KbNuzGx0Rz8hCG-A51vIMwOP1sgVLnnjfkNo9B2R7I,7606
547
- python_watcher-13.0.0.dist-info/LICENSE,sha256=XfKg2H1sVi8OoRxoisUlMqoo10TKvHmU_wU39ks7MyA,10143
548
- python_watcher-13.0.0.dist-info/METADATA,sha256=3Hwq_SDSurkCVRSq59geMA6ohByFAYHboXP5K_E154s,3928
549
- python_watcher-13.0.0.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
550
- python_watcher-13.0.0.dist-info/entry_points.txt,sha256=FCdhj8D9hluy9jjmwnwmFVumvMeOCv6n_IoOCHF8-WU,4397
551
- python_watcher-13.0.0.dist-info/pbr.json,sha256=_JP02CG21G2RH9wiiwMxaUNwaAiW-AzdgEUq2QlEvQk,47
552
- python_watcher-13.0.0.dist-info/top_level.txt,sha256=O2B7Sbzshq5s-tZxb2a7VETvMDiJItSYieAiJ6Jm5yY,8
553
- python_watcher-13.0.0.dist-info/RECORD,,
546
+ python_watcher-13.1.0.dist-info/AUTHORS,sha256=XtnWeqKgPTCgdHxuOhdzFJUggxQCbNDZQ8L_JQJy11Q,7714
547
+ python_watcher-13.1.0.dist-info/LICENSE,sha256=XfKg2H1sVi8OoRxoisUlMqoo10TKvHmU_wU39ks7MyA,10143
548
+ python_watcher-13.1.0.dist-info/METADATA,sha256=6kmhBYofeCy5AeFMKrOGZsYFwQk_YkYRV0TiQbG0jBI,3847
549
+ python_watcher-13.1.0.dist-info/WHEEL,sha256=iAkIy5fosb7FzIOwONchHf19Qu7_1wCWyFNR5gu9nU0,91
550
+ python_watcher-13.1.0.dist-info/entry_points.txt,sha256=PN53WKewBT3McXxlv--kAOX-3NWeJqYVy8wkeCR0orc,4396
551
+ python_watcher-13.1.0.dist-info/pbr.json,sha256=krJ8pZH7ZI5rvVvh2abMCETruIJ8bVpjIWOXboFfwOc,47
552
+ python_watcher-13.1.0.dist-info/top_level.txt,sha256=O2B7Sbzshq5s-tZxb2a7VETvMDiJItSYieAiJ6Jm5yY,8
553
+ python_watcher-13.1.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.34.2)
2
+ Generator: setuptools (75.3.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -78,4 +78,3 @@ taskflow = watcher.applier.workflow_engine.default:DefaultWorkFlowEngine
78
78
 
79
79
  [wsgi_scripts]
80
80
  watcher-api-wsgi = watcher.api.wsgi:initialize_wsgi_app
81
-
@@ -0,0 +1 @@
1
+ {"git_version": "456f42e1", "is_release": true}
@@ -17,14 +17,11 @@ import jsonschema
17
17
 
18
18
  from oslo_log import log
19
19
 
20
- from cinderclient import client as cinder_client
21
20
  from watcher._i18n import _
22
21
  from watcher.applier.actions import base
23
22
  from watcher.common import cinder_helper
24
23
  from watcher.common import exception
25
- from watcher.common import keystone_helper
26
24
  from watcher.common import nova_helper
27
- from watcher.common import utils
28
25
  from watcher import conf
29
26
 
30
27
  CONF = conf.CONF
@@ -70,8 +67,6 @@ class VolumeMigrate(base.BaseAction):
70
67
 
71
68
  def __init__(self, config, osc=None):
72
69
  super(VolumeMigrate, self).__init__(config)
73
- self.temp_username = utils.random_string(10)
74
- self.temp_password = utils.random_string(10)
75
70
  self.cinder_util = cinder_helper.CinderHelper(osc=self.osc)
76
71
  self.nova_util = nova_helper.NovaHelper(osc=self.osc)
77
72
 
@@ -134,83 +129,42 @@ class VolumeMigrate(base.BaseAction):
134
129
 
135
130
  def _can_swap(self, volume):
136
131
  """Judge volume can be swapped"""
132
+ # TODO(sean-k-mooney): rename this to _can_migrate and update
133
+ # tests to reflect that.
137
134
 
135
+ # cinder volume migration can migrate volumes that are not
136
+ # attached to instances or nova can migrate the data for cinder
137
+ # if the volume is in-use. If the volume has no attachments
138
+ # allow cinder to decided if it can be migrated.
138
139
  if not volume.attachments:
139
- return False
140
- instance_id = volume.attachments[0]['server_id']
141
- instance_status = self.nova_util.find_instance(instance_id).status
142
-
143
- if (volume.status == 'in-use' and
144
- instance_status in ('ACTIVE', 'PAUSED', 'RESIZED')):
140
+ LOG.debug(f"volume: {volume.id} has no attachments")
145
141
  return True
146
142
 
147
- return False
148
-
149
- def _create_user(self, volume, user):
150
- """Create user with volume attribute and user information"""
151
- keystone_util = keystone_helper.KeystoneHelper(osc=self.osc)
152
- project_id = getattr(volume, 'os-vol-tenant-attr:tenant_id')
153
- user['project'] = project_id
154
- user['domain'] = keystone_util.get_project(project_id).domain_id
155
- user['roles'] = ['admin']
156
- return keystone_util.create_user(user)
157
-
158
- def _get_cinder_client(self, session):
159
- """Get cinder client by session"""
160
- return cinder_client.Client(
161
- CONF.cinder_client.api_version,
162
- session=session,
163
- endpoint_type=CONF.cinder_client.endpoint_type)
164
-
165
- def _swap_volume(self, volume, dest_type):
166
- """Swap volume to dest_type
167
-
168
- Limitation note: only for compute libvirt driver
169
- """
170
- if not dest_type:
171
- raise exception.Invalid(
172
- message=(_("destination type is required when "
173
- "migration type is swap")))
174
-
175
- if not self._can_swap(volume):
176
- raise exception.Invalid(
177
- message=(_("Invalid state for swapping volume")))
178
-
179
- user_info = {
180
- 'name': self.temp_username,
181
- 'password': self.temp_password}
182
- user = self._create_user(volume, user_info)
183
- keystone_util = keystone_helper.KeystoneHelper(osc=self.osc)
184
- try:
185
- session = keystone_util.create_session(
186
- user.id, self.temp_password)
187
- temp_cinder = self._get_cinder_client(session)
188
-
189
- # swap volume
190
- new_volume = self.cinder_util.create_volume(
191
- temp_cinder, volume, dest_type)
192
- self.nova_util.swap_volume(volume, new_volume)
193
-
194
- # delete old volume
195
- self.cinder_util.delete_volume(volume)
196
-
197
- finally:
198
- keystone_util.delete_user(user)
199
-
200
- return True
143
+ # since it has attachments we need to validate nova's constraints
144
+ instance_id = volume.attachments[0]['server_id']
145
+ instance_status = self.nova_util.find_instance(instance_id).status
146
+ LOG.debug(
147
+ f"volume: {volume.id} is attached to instance: {instance_id} "
148
+ f"in instance status: {instance_status}")
149
+ # NOTE(sean-k-mooney): This used to allow RESIZED which
150
+ # is the resize_verify task state, that is not an acceptable time
151
+ # to migrate volumes, if nova does not block this in the API
152
+ # today that is probably a bug. PAUSED is also questionable but
153
+ # it should generally be safe.
154
+ return (volume.status == 'in-use' and
155
+ instance_status in ('ACTIVE', 'PAUSED'))
201
156
 
202
157
  def _migrate(self, volume_id, dest_node, dest_type):
203
-
204
158
  try:
205
159
  volume = self.cinder_util.get_volume(volume_id)
206
- if self.migration_type == self.SWAP:
207
- if dest_node:
208
- LOG.warning("dest_node is ignored")
209
- return self._swap_volume(volume, dest_type)
160
+ # for backward compatibility map swap to migrate.
161
+ if self.migration_type in (self.SWAP, self.MIGRATE):
162
+ if not self._can_swap(volume):
163
+ raise exception.Invalid(
164
+ message=(_("Invalid state for swapping volume")))
165
+ return self.cinder_util.migrate(volume, dest_node)
210
166
  elif self.migration_type == self.RETYPE:
211
167
  return self.cinder_util.retype(volume, dest_type)
212
- elif self.migration_type == self.MIGRATE:
213
- return self.cinder_util.migrate(volume, dest_node)
214
168
  else:
215
169
  raise exception.Invalid(
216
170
  message=(_("Migration of type '%(migration_type)s' is not "
watcher/common/context.py CHANGED
@@ -11,12 +11,15 @@
11
11
  # under the License.
12
12
 
13
13
  from oslo_context import context
14
+ from oslo_db.sqlalchemy import enginefacade
14
15
  from oslo_log import log
15
16
  from oslo_utils import timeutils
16
17
 
18
+
17
19
  LOG = log.getLogger(__name__)
18
20
 
19
21
 
22
+ @enginefacade.transaction_context_provider
20
23
  class RequestContext(context.RequestContext):
21
24
  """Extends security contexts from the OpenStack common library."""
22
25
 
@@ -15,8 +15,6 @@
15
15
  from oslo_log import log
16
16
 
17
17
  from keystoneauth1.exceptions import http as ks_exceptions
18
- from keystoneauth1 import loading
19
- from keystoneauth1 import session
20
18
  from watcher._i18n import _
21
19
  from watcher.common import clients
22
20
  from watcher.common import exception
@@ -90,35 +88,3 @@ class KeystoneHelper(object):
90
88
  message=(_("Domain name seems ambiguous: %s") %
91
89
  name_or_id))
92
90
  return domains[0]
93
-
94
- def create_session(self, user_id, password):
95
- user = self.get_user(user_id)
96
- loader = loading.get_plugin_loader('password')
97
- auth = loader.load_from_options(
98
- auth_url=CONF.watcher_clients_auth.auth_url,
99
- password=password,
100
- user_id=user_id,
101
- project_id=user.default_project_id)
102
- return session.Session(auth=auth)
103
-
104
- def create_user(self, user):
105
- project = self.get_project(user['project'])
106
- domain = self.get_domain(user['domain'])
107
- _user = self.keystone.users.create(
108
- user['name'],
109
- password=user['password'],
110
- domain=domain,
111
- project=project,
112
- )
113
- for role in user['roles']:
114
- role = self.get_role(role)
115
- self.keystone.roles.grant(
116
- role.id, user=_user.id, project=project.id)
117
- return _user
118
-
119
- def delete_user(self, user):
120
- try:
121
- user = self.get_user(user)
122
- self.keystone.users.delete(user)
123
- except exception.Invalid:
124
- pass
watcher/common/utils.py CHANGED
@@ -19,9 +19,7 @@
19
19
  import asyncio
20
20
  import datetime
21
21
  import inspect
22
- import random
23
22
  import re
24
- import string
25
23
 
26
24
  from croniter import croniter
27
25
  import eventlet
@@ -160,12 +158,8 @@ def extend_with_strict_schema(validator_class):
160
158
  StrictDefaultValidatingDraft4Validator = extend_with_default(
161
159
  extend_with_strict_schema(validators.Draft4Validator))
162
160
 
163
- Draft4Validator = validators.Draft4Validator
164
-
165
161
 
166
- def random_string(n):
167
- return ''.join([random.choice(
168
- string.ascii_letters + string.digits) for i in range(n)])
162
+ Draft4Validator = validators.Draft4Validator
169
163
 
170
164
 
171
165
  # Some clients (e.g. MAAS) use asyncio, which isn't compatible with Eventlet.
@@ -13,8 +13,8 @@
13
13
  from logging import config as log_config
14
14
 
15
15
  from alembic import context
16
+ from oslo_db.sqlalchemy import enginefacade
16
17
 
17
- from watcher.db.sqlalchemy import api as sqla_api
18
18
  from watcher.db.sqlalchemy import models
19
19
 
20
20
  # this is the Alembic Config object, which provides
@@ -43,7 +43,7 @@ def run_migrations_online():
43
43
  and associate a connection with the context.
44
44
 
45
45
  """
46
- engine = sqla_api.get_engine()
46
+ engine = enginefacade.writer.get_engine()
47
47
  with engine.connect() as connection:
48
48
  context.configure(connection=connection,
49
49
  target_metadata=target_metadata)