3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 class IronicVirtMediaHW(object):
17 def __init__(self, log):
20 def attach_virtual_cd(self, image_filename, driver_info, task):
21 """Attaches the given image as virtual media on the node.
23 :param image_filename: the filename of the image to be attached.
24 :param driver_info: the information about the node that the media
25 is being attached to. (provisioning_server, ipmi params etc.)
26 :param task: a TaskManager instance.
27 :raises: VirtmediaOperationError if attaching virtual media failed.
30 raise NotImplementedError
32 def detach_virtual_cd(self, driver_info, task):
33 """Detach virtual cd/dvd from a node
35 :param task: a TaskManager instance.
36 :raises: VirtmediaOperationError if attaching virtual media failed.
38 raise NotImplementedError
40 def set_boot_device(self, task):
41 """Set virtual boot device from a node
43 :param task: a TaskManager instance.
44 :raises: VirtmediaOperationError if attaching virtual media failed.
46 raise NotImplementedError