Merge "Remove watchdog_actions module"
This commit is contained in:
commit
18e997156c
@ -110,7 +110,6 @@ from nova.virt.libvirt import utils as libvirt_utils
|
||||
from nova.virt.libvirt import vif as libvirt_vif
|
||||
from nova.virt.libvirt.volume import remotefs
|
||||
from nova.virt import netutils
|
||||
from nova.virt import watchdog_actions
|
||||
from nova.volume import cinder
|
||||
from nova.volume import encryptors
|
||||
|
||||
@ -4547,7 +4546,7 @@ class LibvirtDriver(driver.ComputeDriver):
|
||||
|
||||
# NB(sross): currently only actually supported by KVM/QEmu
|
||||
if watchdog_action != 'disabled':
|
||||
if watchdog_actions.is_valid_watchdog_action(watchdog_action):
|
||||
if watchdog_action in fields.WatchdogAction.ALL:
|
||||
bark = vconfig.LibvirtConfigGuestWatchdog()
|
||||
bark.action = watchdog_action
|
||||
guest.add_device(bark)
|
||||
|
@ -1,24 +0,0 @@
|
||||
# Copyright 2014 Red Hat, Inc
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
"""Describes and verifies the watchdog device actions."""
|
||||
|
||||
|
||||
# the values which may be passed to libvirt
|
||||
RAW_WATCHDOG_ACTIONS = ['poweroff', 'reset', 'pause', 'none']
|
||||
|
||||
|
||||
def is_valid_watchdog_action(val):
|
||||
"""Check if the given value is a valid watchdog device parameter."""
|
||||
return val in RAW_WATCHDOG_ACTIONS
|
Loading…
Reference in New Issue
Block a user