| 1 |
#!/usr/bin/python |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
|
| 4 |
# Copyright: (c) 2018, Christian Kotte <[email protected]> |
| 5 |
# GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt) |
| 6 |
# SPDX-License-Identifier: GPL-3.0-or-later |
| 7 |
|
| 8 |
from __future__ import absolute_import, division, print_function |
| 9 |
__metaclass__ = type |
| 10 |
|
| 11 |
|
| 12 |
DOCUMENTATION = r''' |
| 13 |
--- |
| 14 |
module: vmware_vcenter_statistics |
| 15 |
short_description: Configures statistics on a vCenter server |
| 16 |
description: |
| 17 |
- This module can be used to configure the vCenter server statistics. |
| 18 |
- The remaining settings can be configured with the module M(community.vmware.vmware_vcenter_settings). |
| 19 |
author: |
| 20 |
- Christian Kotte (@ckotte) |
| 21 |
options: |
| 22 |
interval_past_day: |
| 23 |
description: |
| 24 |
- Settings for vCenter server past day statistic collection. |
| 25 |
suboptions: |
| 26 |
enabled: |
| 27 |
type: bool |
| 28 |
description: Past day statistics collection enabled. |
| 29 |
default: true |
| 30 |
interval_minutes: |
| 31 |
type: int |
| 32 |
description: Interval duration in minutes. |
| 33 |
choices: [ 1, 2, 3, 4, 5 ] |
| 34 |
default: 5 |
| 35 |
save_for_days: |
| 36 |
type: int |
| 37 |
description: Save for value in days. |
| 38 |
choices: [ 1, 2, 3, 4, 5 ] |
| 39 |
default: 1 |
| 40 |
level: |
| 41 |
type: int |
| 42 |
description: Statistics level. |
| 43 |
choices: [ 1, 2, 3, 4 ] |
| 44 |
default: 1 |
| 45 |
type: dict |
| 46 |
interval_past_week: |
| 47 |
description: |
| 48 |
- Settings for vCenter server past week statistic collection. |
| 49 |
suboptions: |
| 50 |
enabled: |
| 51 |
type: bool |
| 52 |
description: Past week statistics collection enabled. |
| 53 |
default: true |
| 54 |
interval_minutes: |
| 55 |
type: int |
| 56 |
description: Interval duration in minutes. |
| 57 |
choices: [ 30 ] |
| 58 |
default: 30 |
| 59 |
save_for_weeks: |
| 60 |
type: int |
| 61 |
description: Save for value in weeks. |
| 62 |
choices: [ 1 ] |
| 63 |
default: 1 |
| 64 |
level: |
| 65 |
type: int |
| 66 |
description: Statistics level. |
| 67 |
choices: [ 1, 2, 3, 4 ] |
| 68 |
default: 1 |
| 69 |
type: dict |
| 70 |
interval_past_month: |
| 71 |
description: |
| 72 |
- Settings for vCenter server past month statistic collection. |
| 73 |
suboptions: |
| 74 |
enabled: |
| 75 |
type: bool |
| 76 |
description: Past month statistics collection enabled. |
| 77 |
default: true |
| 78 |
interval_hours: |
| 79 |
type: int |
| 80 |
description: Interval duration in hours. |
| 81 |
choices: [ 2 ] |
| 82 |
default: 2 |
| 83 |
save_for_months: |
| 84 |
type: int |
| 85 |
description: Save for value in months. |
| 86 |
choices: [ 1 ] |
| 87 |
default: 1 |
| 88 |
level: |
| 89 |
type: int |
| 90 |
description: Statistics level. |
| 91 |
choices: [ 1, 2, 3, 4 ] |
| 92 |
default: 1 |
| 93 |
type: dict |
| 94 |
interval_past_year: |
| 95 |
description: |
| 96 |
- Settings for vCenter server past month statistic collection. |
| 97 |
suboptions: |
| 98 |
enabled: |
| 99 |
type: bool |
| 100 |
description: Past month statistics collection enabled. |
| 101 |
default: true |
| 102 |
interval_days: |
| 103 |
type: int |
| 104 |
description: Interval duration in days. |
| 105 |
choices: [ 1 ] |
| 106 |
default: 1 |
| 107 |
save_for_years: |
| 108 |
type: int |
| 109 |
description: Save for value in years. |
| 110 |
choices: [ 1, 2, 3, 4, 5 ] |
| 111 |
default: 1 |
| 112 |
level: |
| 113 |
type: int |
| 114 |
description: Statistics level. |
| 115 |
choices: [ 1, 2, 3, 4 ] |
| 116 |
default: 1 |
| 117 |
type: dict |
| 118 |
extends_documentation_fragment: |
| 119 |
- vmware.vmware.base_options |
| 120 |
|
| 121 |
''' |
| 122 |
|
| 123 |
EXAMPLES = r''' |
| 124 |
- name: Configure vCenter statistics |
| 125 |
community.vmware.vmware_vcenter_statistics: |
| 126 |
hostname: '{{ vcenter_hostname }}' |
| 127 |
username: '{{ vcenter_username }}' |
| 128 |
password: '{{ vcenter_password }}' |
| 129 |
interval_past_day: |
| 130 |
enabled: true |
| 131 |
interval_minutes: 5 |
| 132 |
save_for_days: 1 |
| 133 |
level: 1 |
| 134 |
interval_past_week: |
| 135 |
enabled: true |
| 136 |
level: 1 |
| 137 |
interval_past_month: |
| 138 |
enabled: true |
| 139 |
level: 1 |
| 140 |
interval_past_year: |
| 141 |
enabled: true |
| 142 |
save_for_years: 1 |
| 143 |
level: 1 |
| 144 |
delegate_to: localhost |
| 145 |
''' |
| 146 |
|
| 147 |
RETURN = r''' |
| 148 |
results: |
| 149 |
description: metadata about vCenter statistics settings |
| 150 |
returned: always |
| 151 |
type: dict |
| 152 |
sample: { |
| 153 |
"changed": false, |
| 154 |
"msg": "vCenter statistics already configured properly", |
| 155 |
"past_day_enabled": true, |
| 156 |
"past_day_interval": 5, |
| 157 |
"past_day_level": 1, |
| 158 |
"past_day_save_for": 1, |
| 159 |
"past_month_enabled": true, |
| 160 |
"past_month_interval": 2, |
| 161 |
"past_month_level": 1, |
| 162 |
"past_month_save_for": 1, |
| 163 |
"past_week_enabled": true, |
| 164 |
"past_week_interval": 30, |
| 165 |
"past_week_level": 1, |
| 166 |
"past_week_save_for": 1, |
| 167 |
"past_year_enabled": true, |
| 168 |
"past_year_interval": 1, |
| 169 |
"past_year_level": 1, |
| 170 |
"past_year_save_for": 1 |
| 171 |
} |
| 172 |
''' |
| 173 |
|
| 174 |
try: |
| 175 |
from pyVmomi import vim, vmodl |
| 176 |
except ImportError: |
| 177 |
pass |
| 178 |
|
| 179 |
from ansible.module_utils.basic import AnsibleModule |
| 180 |
from ansible_collections.community.vmware.plugins.module_utils.vmware import PyVmomi |
| 181 |
from ansible_collections.vmware.vmware.plugins.module_utils.argument_spec import base_argument_spec |
| 182 |
from ansible.module_utils.common.text.converters import to_native |
| 183 |
|
| 184 |
|
| 185 |
# This is a helper class to sort the changes in a valid order |
| 186 |
# "Greater than" means a change has to happen after another one. |
| 187 |
# As an example, let's say self is daily (key == 1) and other is weekly (key == 2) |
| 188 |
class ChangeHelper: |
| 189 |
def __init__(self, old, new): |
| 190 |
self.key = new.key |
| 191 |
self.old = old |
| 192 |
self.new = new |
| 193 |
|
| 194 |
def __eq__(self, other): |
| 195 |
return ((self.key, self.new.enabled, self.new.level) |
| 196 |
== (other.key, other.new.enabled, other.new.level)) |
| 197 |
|
| 198 |
def __gt__(self, other): |
| 199 |
if self.key < other.key: |
| 200 |
# You cannot disable daily if weekly is enabled, so later |
| 201 |
if self.new.enabled < other.old.enabled: |
| 202 |
return True |
| 203 |
# Enabling daily is OK if weekly is disabled |
| 204 |
elif self.new.enabled > other.old.enabled: |
| 205 |
return False |
| 206 |
# Otherwise, decreasing the daily level below the current weekly level has to be done later |
| 207 |
else: |
| 208 |
return self.new.level < other.old.level |
| 209 |
else: |
| 210 |
return not (other > self) |
| 211 |
|
| 212 |
def __ge__(self, other): |
| 213 |
return (self > other) or (self == other) |
| 214 |
|
| 215 |
def __lt__(self, other): |
| 216 |
return not (self >= other) |
| 217 |
|
| 218 |
def __le__(self, other): |
| 219 |
return not (self > other) |
| 220 |
|
| 221 |
|
| 222 |
class VmwareVcenterStatistics(PyVmomi): |
| 223 |
"""Manage statistics for a vCenter server""" |
| 224 |
|
| 225 |
def __init__(self, module): |
| 226 |
super(VmwareVcenterStatistics, self).__init__(module) |
| 227 |
|
| 228 |
if not self.is_vcenter(): |
| 229 |
self.module.fail_json(msg="You have to connect to a vCenter server!") |
| 230 |
|
| 231 |
def ensure(self): |
| 232 |
"""Manage statistics for a vCenter server""" |
| 233 |
|
| 234 |
DAILY_COUNTER = 1 |
| 235 |
WEEKLY_COUNTER = 2 |
| 236 |
MONTHLY_COUNTER = 3 |
| 237 |
YEARLY_COUNTER = 4 |
| 238 |
|
| 239 |
result = dict(changed=False, msg='') |
| 240 |
message = '' |
| 241 |
|
| 242 |
past_day_enabled = self.params['interval_past_day'].get('enabled', True) |
| 243 |
past_day_seconds = self.params['interval_past_day'].get('interval_minutes', 5) * 60 |
| 244 |
past_day_save_for_seconds = self.params['interval_past_day'].get('save_for_days', 1) * 86400 |
| 245 |
past_day_level = self.params['interval_past_day'].get('level', 1) |
| 246 |
past_week_enabled = self.params['interval_past_week'].get('enabled', True) |
| 247 |
past_week_seconds = self.params['interval_past_week'].get('interval_minutes', 30) * 60 |
| 248 |
past_week_save_for_seconds = self.params['interval_past_week'].get('save_for_weeks', 1) * 604800 |
| 249 |
past_week_level = self.params['interval_past_week'].get('level', 1) |
| 250 |
past_month_enabled = self.params['interval_past_month'].get('enabled', True) |
| 251 |
past_month_seconds = self.params['interval_past_month'].get('interval_hours', 2) * 3600 |
| 252 |
past_month_save_for_seconds = self.params['interval_past_month'].get('save_for_months', 1) * 2592000 |
| 253 |
past_month_level = self.params['interval_past_month'].get('level', 1) |
| 254 |
past_year_enabled = self.params['interval_past_year'].get('enabled', True) |
| 255 |
past_year_seconds = self.params['interval_past_year'].get('interval_days', 1) * 86400 |
| 256 |
past_year_save_for_seconds = self.params['interval_past_year'].get('save_for_years', 1) * 31536000 |
| 257 |
past_year_level = self.params['interval_past_year'].get('level', 1) |
| 258 |
|
| 259 |
# Check if level options are valid |
| 260 |
if past_year_level > past_month_level: |
| 261 |
self.module.fail_json(msg="The statistics level for past year can't be higher than past month!") |
| 262 |
if past_month_level > past_week_level: |
| 263 |
self.module.fail_json(msg="The statistics level for past month can't be higher than past week!") |
| 264 |
if past_week_level > past_day_level: |
| 265 |
self.module.fail_json(msg="The statistics level for past week can't be higher than past day!") |
| 266 |
|
| 267 |
# Check if state options are valid |
| 268 |
if not past_day_enabled and (past_week_enabled or past_month_enabled or past_year_enabled): |
| 269 |
self.module.fail_json(msg="The intervals past week, month, and year need to be disabled as well!") |
| 270 |
if not past_week_enabled and (past_month_enabled or past_year_enabled): |
| 271 |
self.module.fail_json(msg="The intervals past month, and year need to be disabled as well!") |
| 272 |
if not past_month_enabled and past_year_enabled: |
| 273 |
self.module.fail_json(msg="The interval past year need to be disabled as well!") |
| 274 |
if past_year_enabled and (not past_day_enabled or not past_week_enabled or not past_month_enabled): |
| 275 |
self.module.fail_json(msg="The intervals past day, week, and month need to be enabled as well!") |
| 276 |
if past_month_enabled and (not past_day_enabled or not past_week_enabled): |
| 277 |
self.module.fail_json(msg="The intervals past day, and week need to be enabled as well!") |
| 278 |
if past_week_enabled and (not past_day_enabled): |
| 279 |
self.module.fail_json(msg="The intervals past day need to be enabled as well!") |
| 280 |
|
| 281 |
changed = False |
| 282 |
changed_list = [] |
| 283 |
|
| 284 |
# Check statistics |
| 285 |
result['past_day_enabled'] = past_day_enabled |
| 286 |
result['past_day_interval'] = int(past_day_seconds / 60) |
| 287 |
result['past_day_save_for'] = int(past_day_save_for_seconds / 86400) |
| 288 |
result['past_day_level'] = past_day_level |
| 289 |
result['past_week_enabled'] = past_week_enabled |
| 290 |
result['past_week_interval'] = int(past_week_seconds / 60) |
| 291 |
result['past_week_save_for'] = int(past_week_save_for_seconds / 604800) |
| 292 |
result['past_week_level'] = past_week_level |
| 293 |
result['past_month_enabled'] = past_month_enabled |
| 294 |
result['past_month_interval'] = int(past_month_seconds / 3600) |
| 295 |
result['past_month_save_for'] = int(past_month_save_for_seconds / 2592000) |
| 296 |
result['past_month_level'] = past_month_level |
| 297 |
result['past_year_enabled'] = past_year_enabled |
| 298 |
result['past_year_interval'] = int(past_year_seconds / 86400) |
| 299 |
result['past_year_save_for'] = int(past_year_save_for_seconds / 31536000) |
| 300 |
result['past_year_level'] = past_year_level |
| 301 |
change_statistics_list = [] |
| 302 |
perf_manager = self.content.perfManager |
| 303 |
for historical_interval in perf_manager.historicalInterval: |
| 304 |
# Statistics for past day |
| 305 |
if historical_interval.name == 'Past day' and ( |
| 306 |
historical_interval.samplingPeriod != past_day_seconds |
| 307 |
or historical_interval.length != past_day_save_for_seconds |
| 308 |
or historical_interval.level != past_day_level |
| 309 |
or historical_interval.enabled != past_day_enabled |
| 310 |
): |
| 311 |
changed = True |
| 312 |
changed_list.append("Past day interval") |
| 313 |
if historical_interval.enabled != past_day_enabled: |
| 314 |
result['past_day_enabled_previous'] = historical_interval.enabled |
| 315 |
if historical_interval.samplingPeriod != past_day_seconds: |
| 316 |
result['past_day_interval_previous'] = int(historical_interval.samplingPeriod / 60) |
| 317 |
if historical_interval.length != past_day_save_for_seconds: |
| 318 |
result['past_day_save_for_previous'] = int(historical_interval.length / 86400) |
| 319 |
if historical_interval.level != past_day_level: |
| 320 |
result['past_day_level_previous'] = historical_interval.level |
| 321 |
|
| 322 |
change_statistics_list.append( |
| 323 |
ChangeHelper( |
| 324 |
historical_interval, |
| 325 |
vim.HistoricalInterval( |
| 326 |
key=DAILY_COUNTER, |
| 327 |
samplingPeriod=past_day_seconds, |
| 328 |
name='Past day', |
| 329 |
length=past_day_save_for_seconds, |
| 330 |
level=past_day_level, |
| 331 |
enabled=past_day_enabled |
| 332 |
) |
| 333 |
) |
| 334 |
) |
| 335 |
|
| 336 |
# Statistics for past week |
| 337 |
if historical_interval.name == 'Past week' and ( |
| 338 |
historical_interval.samplingPeriod != past_week_seconds |
| 339 |
or historical_interval.length != past_week_save_for_seconds |
| 340 |
or historical_interval.level != past_week_level |
| 341 |
or historical_interval.enabled != past_week_enabled |
| 342 |
): |
| 343 |
changed = True |
| 344 |
changed_list.append("Past week interval") |
| 345 |
if historical_interval.enabled != past_week_enabled: |
| 346 |
result['past_week_enabled_previous'] = historical_interval.enabled |
| 347 |
if historical_interval.samplingPeriod != past_week_seconds: |
| 348 |
result['past_week_interval_previous'] = int(historical_interval.samplingPeriod / 60) |
| 349 |
if historical_interval.length != past_week_save_for_seconds: |
| 350 |
result['past_week_save_for_previous'] = int(historical_interval.length / 604800) |
| 351 |
if historical_interval.level != past_week_level: |
| 352 |
result['past_week_level_previous'] = historical_interval.level |
| 353 |
|
| 354 |
change_statistics_list.append( |
| 355 |
ChangeHelper( |
| 356 |
historical_interval, |
| 357 |
vim.HistoricalInterval( |
| 358 |
key=WEEKLY_COUNTER, |
| 359 |
samplingPeriod=past_week_seconds, |
| 360 |
name='Past week', |
| 361 |
length=past_week_save_for_seconds, |
| 362 |
level=past_week_level, |
| 363 |
enabled=past_week_enabled |
| 364 |
) |
| 365 |
) |
| 366 |
) |
| 367 |
|
| 368 |
# Statistics for past month |
| 369 |
if historical_interval.name == 'Past month' and ( |
| 370 |
historical_interval.samplingPeriod != past_month_seconds |
| 371 |
or historical_interval.length != past_month_save_for_seconds |
| 372 |
or historical_interval.level != past_month_level |
| 373 |
or historical_interval.enabled != past_month_enabled |
| 374 |
): |
| 375 |
changed = True |
| 376 |
changed_list.append("Past month interval") |
| 377 |
if historical_interval.enabled != past_month_enabled: |
| 378 |
result['past_month_enabled_previous'] = historical_interval.enabled |
| 379 |
if historical_interval.samplingPeriod != past_month_seconds: |
| 380 |
result['past_month_interval_previous'] = int(historical_interval.samplingPeriod / 3600) |
| 381 |
if historical_interval.length != past_month_save_for_seconds: |
| 382 |
result['past_month_save_for_previous'] = int(historical_interval.length / 2592000) |
| 383 |
if historical_interval.level != past_month_level: |
| 384 |
result['past_month_level_previous'] = historical_interval.level |
| 385 |
|
| 386 |
change_statistics_list.append( |
| 387 |
ChangeHelper( |
| 388 |
historical_interval, |
| 389 |
vim.HistoricalInterval( |
| 390 |
key=MONTHLY_COUNTER, |
| 391 |
samplingPeriod=past_month_seconds, |
| 392 |
name='Past month', |
| 393 |
length=past_month_save_for_seconds, |
| 394 |
level=past_month_level, |
| 395 |
enabled=past_month_enabled |
| 396 |
) |
| 397 |
) |
| 398 |
) |
| 399 |
|
| 400 |
# Statistics for past year |
| 401 |
if historical_interval.name == 'Past year' and ( |
| 402 |
historical_interval.samplingPeriod != past_year_seconds |
| 403 |
or historical_interval.length != past_year_save_for_seconds |
| 404 |
or historical_interval.level != past_year_level |
| 405 |
or historical_interval.enabled != past_year_enabled |
| 406 |
): |
| 407 |
changed = True |
| 408 |
changed_list.append("Past year interval") |
| 409 |
if historical_interval.enabled != past_year_enabled: |
| 410 |
result['past_year_enabled_previous'] = historical_interval.enabled |
| 411 |
if historical_interval.samplingPeriod != past_year_seconds: |
| 412 |
result['past_year_interval_previous'] = int(historical_interval.samplingPeriod / 86400) |
| 413 |
if historical_interval.length != past_year_save_for_seconds: |
| 414 |
result['past_year_save_for_previous'] = int(historical_interval.length / 31536000) |
| 415 |
if historical_interval.level != past_year_level: |
| 416 |
result['past_year_level_previous'] = historical_interval.level |
| 417 |
|
| 418 |
change_statistics_list.append( |
| 419 |
ChangeHelper( |
| 420 |
historical_interval, |
| 421 |
vim.HistoricalInterval( |
| 422 |
key=YEARLY_COUNTER, |
| 423 |
samplingPeriod=past_year_seconds, |
| 424 |
name='Past year', |
| 425 |
length=past_year_save_for_seconds, |
| 426 |
level=past_year_level, |
| 427 |
enabled=past_year_enabled |
| 428 |
) |
| 429 |
) |
| 430 |
) |
| 431 |
|
| 432 |
if changed: |
| 433 |
if self.module.check_mode: |
| 434 |
changed_suffix = ' would be changed' |
| 435 |
else: |
| 436 |
changed_suffix = ' changed' |
| 437 |
if len(changed_list) > 2: |
| 438 |
message = ', '.join(changed_list[:-1]) + ', and ' + str(changed_list[-1]) |
| 439 |
elif len(changed_list) == 2: |
| 440 |
message = ' and '.join(changed_list) |
| 441 |
elif len(changed_list) == 1: |
| 442 |
message = changed_list[0] |
| 443 |
message += changed_suffix |
| 444 |
if not self.module.check_mode: |
| 445 |
change_statistics_list.sort() |
| 446 |
for statistic in change_statistics_list: |
| 447 |
self.update_perf_interval(perf_manager, statistic.new) |
| 448 |
else: |
| 449 |
message = "vCenter statistics already configured properly" |
| 450 |
result['changed'] = changed |
| 451 |
result['msg'] = message |
| 452 |
|
| 453 |
self.module.exit_json(**result) |
| 454 |
|
| 455 |
def update_perf_interval(self, perf_manager, statistic): |
| 456 |
"""Update statistics interval""" |
| 457 |
try: |
| 458 |
perf_manager.UpdatePerfInterval(statistic) |
| 459 |
except vmodl.fault.InvalidArgument as invalid_argument: |
| 460 |
self.module.fail_json( |
| 461 |
msg="The set of arguments passed to the function is not specified correctly or " |
| 462 |
"the update does not conform to the rules: %s" % to_native(invalid_argument.msg) |
| 463 |
) |
| 464 |
|
| 465 |
|
| 466 |
def main(): |
| 467 |
"""Main""" |
| 468 |
argument_spec = base_argument_spec() |
| 469 |
argument_spec.update( |
| 470 |
interval_past_day=dict( |
| 471 |
type='dict', |
| 472 |
options=dict( |
| 473 |
enabled=dict(type='bool', default=True), |
| 474 |
interval_minutes=dict(type='int', choices=[1, 2, 3, 4, 5], default=5), |
| 475 |
save_for_days=dict(type='int', choices=[1, 2, 3, 4, 5], default=1), |
| 476 |
level=dict(type='int', choices=[1, 2, 3, 4], default=1), |
| 477 |
), |
| 478 |
), |
| 479 |
interval_past_week=dict( |
| 480 |
type='dict', |
| 481 |
options=dict( |
| 482 |
enabled=dict(type='bool', default=True), |
| 483 |
interval_minutes=dict(type='int', choices=[30], default=30), |
| 484 |
save_for_weeks=dict(type='int', choices=[1], default=1), |
| 485 |
level=dict(type='int', choices=[1, 2, 3, 4], default=1), |
| 486 |
), |
| 487 |
), |
| 488 |
interval_past_month=dict( |
| 489 |
type='dict', |
| 490 |
options=dict( |
| 491 |
enabled=dict(type='bool', default=True), |
| 492 |
interval_hours=dict(type='int', choices=[2], default=2), |
| 493 |
save_for_months=dict(type='int', choices=[1], default=1), |
| 494 |
level=dict(type='int', choices=[1, 2, 3, 4], default=1), |
| 495 |
), |
| 496 |
), |
| 497 |
interval_past_year=dict( |
| 498 |
type='dict', |
| 499 |
options=dict( |
| 500 |
enabled=dict(type='bool', default=True), |
| 501 |
interval_days=dict(type='int', choices=[1], default=1), |
| 502 |
save_for_years=dict(type='int', choices=[1, 2, 3, 4, 5], default=1), |
| 503 |
level=dict(type='int', choices=[1, 2, 3, 4], default=1), |
| 504 |
), |
| 505 |
), |
| 506 |
) |
| 507 |
|
| 508 |
module = AnsibleModule( |
| 509 |
argument_spec=argument_spec, |
| 510 |
supports_check_mode=True |
| 511 |
) |
| 512 |
|
| 513 |
host_snmp = VmwareVcenterStatistics(module) |
| 514 |
host_snmp.ensure() |
| 515 |
|
| 516 |
|
| 517 |
if __name__ == '__main__': |
| 518 |
main() |