예제 #1
0
파일: _proxy.py 프로젝트: xinni-ge/eclsdk
    def stop_server(self, server_id):
        """Stop the Baremetal Server associated with server_id.
        This request will be accepted only when the task_state is None.

        :param string server_id: ID for the server.
        :return: ``None``
        """
        server = _server.ServerAction()
        return server.stop(self.session, server_id)
예제 #2
0
파일: _proxy.py 프로젝트: xinni-ge/eclsdk
    def media_detach(self, server_id, image):
        """Detach media from the Baremetal Server associated with server_id.
        This request will be accepted only when the task_state is None.

        :param string server_id: ID for the server.
        :param string image: ID of the image you want to detach.
        :return: ``None``
        """
        server = _server.ServerAction()
        return server.media_detach(self.session, server_id, image)
예제 #3
0
파일: _proxy.py 프로젝트: xinni-ge/eclsdk
    def start_server(self, server_id, boot_mode):
        """Power on the Baremetal Server associated with server_id.
        This request will be accepted only when the task_state is None.

        :param string server_id: ID for the server.
        :param string boot_mode: Baremetal Server boot mode.
            A valid value is DISK, PXE, LEGACY or ISO.
        :return: ``None``
        """
        server = _server.ServerAction()
        return server.start(self.session, server_id, boot_mode)
예제 #4
0
파일: _proxy.py 프로젝트: nttcom/eclsdk
    def stop_server(self, server_id, shutdown_type=None):
        """Stop the Baremetal Server associated with server_id.
        This request will be accepted only when the task_state is None.

        :param string server_id: ID for the server.
        :param string shutdown_type: Baremetal Server shutdown mode.
            A valid value is HARD or SOFT.
        :return: ``None``
        """
        server = _server.ServerAction()
        return server.stop(self.session, server_id, shutdown_type)
예제 #5
0
파일: _proxy.py 프로젝트: xinni-ge/eclsdk
    def get_management_console(self, server_id):
        """Gets information to access the remote console of Baremetal
        Server. This request will be accepted only when the task_state
        is None.
        This API response console parameters are used at Remote Console
        Access - Get Started. To access your Baremetal Server, you have
        to create VPN user and connect to VPN.

        :param string server_id: ID for the server.
        :return: :class:`~ecl.baremetal.v2.server.ServerAction`
        """
        server = _server.ServerAction()
        return server.get_management_console(self.session, server_id)
예제 #6
0
파일: _proxy.py 프로젝트: nttcom/eclsdk
    def reboot_server(self, server_id, shutdown_type):
        """Reboot the Baremetal Server associated with server_id.
        This request will be accepted only when the task_state is None.

        :param string server_id: ID for the server.
        :param string shutdown_type: Baremetal Server shutdown mode.
            A valid value is HARD or SOFT. HARD is force restart by IPMI.
            This operations is equal to power down.
            SOFT is restated by ACPI.
        :return: ``None``
        """
        server = _server.ServerAction()
        return server.reboot(self.session, server_id, shutdown_type)
예제 #7
0
파일: _proxy.py 프로젝트: nttcom/eclsdk
    def change_boot_mode(self, server_id, shutdown_type, boot_mode):
        """Change the Baremetal Server boot mode.
        This request will be accepted only when the task_state is None.

        :param string server_id: ID for the server.
        :param string shutdown_type: Baremetal Server shutdown mode.
            A valid value is HARD or SOFT. HARD is force restart by IPMI.
            This operations is equal to power down.
            SOFT is restated by ACPI.
        :param string boot_mode: Baremetal Server boot mode.
            A valid value is DISK, PXE, LEGACY or ISO.
        :return: ``None``
        """
        server = _server.ServerAction()
        return server.change_boot_mode(self.session, server_id, shutdown_type,
                                       boot_mode)