X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=src%2Fironic_virtmedia_driver%2Fvendors%2Fironic_virtmedia_hw.py;fp=src%2Fironic_virtmedia_driver%2Fvendors%2Fironic_virtmedia_hw.py;h=4dd75abbc8c4bb9066947ee5c92eb76837fba011;hb=be2fb9459b65bb8b07b23adebadc16530d26e231;hp=0000000000000000000000000000000000000000;hpb=aaec6775b13b0c694235c80e6dfbca8696307af9;p=ta%2Fironic-virtmedia-driver.git diff --git a/src/ironic_virtmedia_driver/vendors/ironic_virtmedia_hw.py b/src/ironic_virtmedia_driver/vendors/ironic_virtmedia_hw.py new file mode 100644 index 0000000..4dd75ab --- /dev/null +++ b/src/ironic_virtmedia_driver/vendors/ironic_virtmedia_hw.py @@ -0,0 +1,46 @@ +# Copyright 2019 Nokia +# +# 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. +# + +class IronicVirtMediaHW(object): + def __init__(self, log): + self.log = log + + def attach_virtual_cd(self, image_filename, driver_info, task): + """Attaches the given image as virtual media on the node. + + :param image_filename: the filename of the image to be attached. + :param driver_info: the information about the node that the media + is being attached to. (provisioning_server, ipmi params etc.) + :param task: a TaskManager instance. + :raises: VirtmediaOperationError if attaching virtual media failed. + """ + + raise NotImplementedError + + def detach_virtual_cd(self, driver_info, task): + """Detach virtual cd/dvd from a node + + :param task: a TaskManager instance. + :raises: VirtmediaOperationError if attaching virtual media failed. + """ + raise NotImplementedError + + def set_boot_device(self, task): + """Set virtual boot device from a node + + :param task: a TaskManager instance. + :raises: VirtmediaOperationError if attaching virtual media failed. + """ + raise NotImplementedError