-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathpyproject.toml
More file actions
197 lines (171 loc) · 8.31 KB
/
Copy pathpyproject.toml
File metadata and controls
197 lines (171 loc) · 8.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
[build-system]
requires = ["pbr>=6.0.0", "setuptools>=64.0.0"]
build-backend = "pbr.build"
[project]
name = "python-watcher"
description = "OpenStack Watcher provides a flexible and scalable resource optimization service for multi-tenant OpenStack-based clouds."
readme = {file = "README.rst", content-type = "text/x-rst"}
license = {text = "Apache-2.0"}
requires-python = ">=3.10"
authors = [
{name = "OpenStack", email = "openstack-discuss@lists.openstack.org"},
]
classifiers = [
"Environment :: OpenStack",
"Intended Audience :: Information Technology",
"Intended Audience :: System Administrators",
"License :: OSI Approved :: Apache Software License",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dynamic = ["version", "dependencies"]
[project.urls]
"Bug Tracker" = "https://bugs.launchpad.net/watcher/"
"Documentation" = "https://docs.openstack.org/watcher/latest/"
"Source Code" = "https://opendev.org/openstack/watcher"
[project.scripts]
watcher-api = "watcher.cmd.eventlet.api:main"
watcher-db-manage = "watcher.cmd.dbmanage:main"
watcher-decision-engine = "watcher.cmd.eventlet.decisionengine:main"
watcher-applier = "watcher.cmd.eventlet.applier:main"
watcher-sync = "watcher.cmd.sync:main"
watcher-status = "watcher.cmd.status:main"
[project.entry-points."oslo.config.opts"]
watcher = "watcher.conf.opts:list_opts"
[project.entry-points."oslo.config.opts.defaults"]
watcher = "watcher.common.config:set_lib_defaults"
[project.entry-points."oslo.policy.policies"]
watcher = "watcher.common.policies:list_rules"
[project.entry-points."oslo.policy.enforcer"]
watcher = "watcher.common.policy:get_enforcer"
[project.entry-points."wsgi_scripts"]
watcher-api-wsgi = "watcher.api.wsgi:initialize_wsgi_app"
[project.entry-points."watcher.database.migration_backend"]
sqlalchemy = "watcher.db.sqlalchemy.migration"
[project.entry-points."watcher_goals"]
unclassified = "watcher.decision_engine.goal.goals:Unclassified"
dummy = "watcher.decision_engine.goal.goals:Dummy"
server_consolidation = "watcher.decision_engine.goal.goals:ServerConsolidation"
thermal_optimization = "watcher.decision_engine.goal.goals:ThermalOptimization"
workload_balancing = "watcher.decision_engine.goal.goals:WorkloadBalancing"
airflow_optimization = "watcher.decision_engine.goal.goals:AirflowOptimization"
noisy_neighbor = "watcher.decision_engine.goal.goals:NoisyNeighborOptimization"
saving_energy = "watcher.decision_engine.goal.goals:SavingEnergy"
hardware_maintenance = "watcher.decision_engine.goal.goals:HardwareMaintenance"
cluster_maintaining = "watcher.decision_engine.goal.goals:ClusterMaintaining"
[project.entry-points."watcher_scoring_engines"]
dummy_scorer = "watcher.decision_engine.scoring.dummy_scorer:DummyScorer"
[project.entry-points."watcher_scoring_engine_containers"]
dummy_scoring_container = "watcher.decision_engine.scoring.dummy_scoring_container:DummyScoringContainer"
[project.entry-points."watcher_strategies"]
dummy = "watcher.decision_engine.strategy.strategies.dummy_strategy:DummyStrategy"
dummy_with_scorer = "watcher.decision_engine.strategy.strategies.dummy_with_scorer:DummyWithScorer"
dummy_with_resize = "watcher.decision_engine.strategy.strategies.dummy_with_resize:DummyWithResize"
actuator = "watcher.decision_engine.strategy.strategies.actuation:Actuator"
basic = "watcher.decision_engine.strategy.strategies.basic_consolidation:BasicConsolidation"
outlet_temperature = "watcher.decision_engine.strategy.strategies.outlet_temp_control:OutletTempControl"
saving_energy = "watcher.decision_engine.strategy.strategies.saving_energy:SavingEnergy"
vm_workload_consolidation = "watcher.decision_engine.strategy.strategies.vm_workload_consolidation:VMWorkloadConsolidation"
workload_stabilization = "watcher.decision_engine.strategy.strategies.workload_stabilization:WorkloadStabilization"
workload_balance = "watcher.decision_engine.strategy.strategies.workload_balance:WorkloadBalance"
uniform_airflow = "watcher.decision_engine.strategy.strategies.uniform_airflow:UniformAirflow"
noisy_neighbor = "watcher.decision_engine.strategy.strategies.noisy_neighbor:NoisyNeighbor"
storage_capacity_balance = "watcher.decision_engine.strategy.strategies.storage_capacity_balance:StorageCapacityBalance"
zone_migration = "watcher.decision_engine.strategy.strategies.zone_migration:ZoneMigration"
host_maintenance = "watcher.decision_engine.strategy.strategies.host_maintenance:HostMaintenance"
node_resource_consolidation = "watcher.decision_engine.strategy.strategies.node_resource_consolidation:NodeResourceConsolidation"
[project.entry-points."watcher_actions"]
migrate = "watcher.applier.actions.migration:Migrate"
nop = "watcher.applier.actions.nop:Nop"
sleep = "watcher.applier.actions.sleep:Sleep"
change_nova_service_state = "watcher.applier.actions.change_nova_service_state:ChangeNovaServiceState"
resize = "watcher.applier.actions.resize:Resize"
change_node_power_state = "watcher.applier.actions.change_node_power_state:ChangeNodePowerState"
volume_migrate = "watcher.applier.actions.volume_migration:VolumeMigrate"
stop = "watcher.applier.actions.stop:Stop"
delete = "watcher.applier.actions.delete:Delete"
shelve = "watcher.applier.actions.shelve:Shelve"
[project.entry-points."watcher_workflow_engines"]
taskflow = "watcher.applier.workflow_engine.default:DefaultWorkFlowEngine"
[project.entry-points."watcher_planners"]
weight = "watcher.decision_engine.planner.weight:WeightPlanner"
workload_stabilization = "watcher.decision_engine.planner.workload_stabilization:WorkloadStabilizationPlanner"
node_resource_consolidation = "watcher.decision_engine.planner.node_resource_consolidation:NodeResourceConsolidationPlanner"
[project.entry-points."watcher_cluster_data_model_collectors"]
compute = "watcher.decision_engine.model.collector.nova:NovaClusterDataModelCollector"
storage = "watcher.decision_engine.model.collector.cinder:CinderClusterDataModelCollector"
baremetal = "watcher.decision_engine.model.collector.ironic:BaremetalClusterDataModelCollector"
[tool.setuptools.packages.find]
where = ["."]
include = ["watcher*"]
[tool.setuptools.data-files]
"etc/apache2" = [
"etc/apache2/watcher",
]
"etc/watcher" = [
"etc/watcher/README-watcher.conf.txt",
]
"etc/watcher/oslo-config-generator" = [
"etc/watcher/oslo-config-generator/watcher.conf",
]
"etc/watcher/oslo-policy-generator" = [
"etc/watcher/oslo-policy-generator/watcher-policy-generator.conf",
]
[tool.ruff]
line-length = 79
target-version = "py310"
[tool.ruff.lint]
select = ["C90","E4", "E5", "E7", "E9", "F", "G", "I", "LOG","S", "UP", "W"]
external = ["H"]
ignore = [
# we only use asserts for type narrowing
"S101",
# we do not use random number geneerators for crypto
"S311",
# S104 Possible binding to all interfaces
"S104",
# S105 Possible hardcoded password assigned to variable"
"S105",
# S106 Possible hardcoded password assigned to argument
"S106",
# S110 `try`-`except`-`pass` detected, consider logging the exception
"S110",
# UP031 % format — defer f-string migration to a later pass
"UP031",
# UP032 f-string — defer migration to a later pass
"UP032",
]
[tool.ruff.lint.per-file-ignores]
"watcher/tests/*" = ["S"]
"watcher/db/sqlalchemy/alembic/*" = ["E501"]
"doc/*" = ["E501"]
[tool.ruff.lint.mccabe]
# Flag errors (`C901`) whenever the complexity level exceeds 5.
max-complexity = 20
[tool.bandit]
exclude_dirs = ['tests']
skips = ['B101', 'B311', 'B320']
[tool.ruff.lint.isort]
known-first-party = ["watcher"]
force-single-line = true
lines-after-imports = 2
lines-between-types = 1
section-order = ["future", "standard-library", "third-party", "first-party"]
# this is the default but just being explicit about the behavior
# in case that ever changes.
force-sort-within-sections = false
[tool.ruff.format]
quote-style = "preserve"
docstring-code-format = true
skip-magic-trailing-comma = true
[tool.codespell]
skip = "*.po,*.js,*.css,*.html,*.svg,HACKING.py,*hacking*,*build*,*_static*,doc/dictionary.txt,*.pyc,*.inv,*.gz,*.jpg,*.png,*.vsd,*.graffle,*.json"
count = true
quiet-level = 4