예제 #1
0
    def update_vmware_console(self, updates, reset=False):
        """ Navigate to a Server Tab. Updates Vmware console

        Args:
             updates: dict, widgets will be updated regarding updates.
             reset: By default(False) changes will not be reset, if True changes will be reset

        """
        for name, value in updates.items():
            if name == 'console_type':
                if value not in self.CONSOLE_TYPES:
                    raise ConsoleTypeNotSupported(value)
                if self.appliance.version < '5.8':
                    raise ConsoleNotSupported(
                        product_name=self.appliance.product_name,
                        version=self.appliance.version)
                # From 5.8 version need to add WebMKS_SDK
                if value == 'VMware WebMKS':
                    self.appliance.ssh_client.run_command(
                        'curl {} -o WebMKS_SDK.zip'.format(
                            conf.cfme_data.vm_console.webmks_console.
                            webmks_sdk_download_url))

                    self.appliance.ssh_client.run_command(
                        'unzip -o ~/WebMKS_SDK.zip -d {}'.format(
                            conf.cfme_data.vm_console.webmks_console.
                            webmks_sdk_extract_location))

        view = navigate_to(self.appliance.server, 'Server')
        view.browser.refresh()
        updated = view.vmware_console.fill(updates)
        self._save_action(view, updated, reset)
    def update_vmware_console(self, updates, reset=False):
        """ Navigate to a Server Tab. Updates Vmware console

        Args:
             updates: dict, widgets will be updated regarding updates.
             reset: By default(False) changes will not be reset, if True changes will be reset

        """
        view = navigate_to(self, 'Details')
        for name, value in updates.items():
            if name == 'console_type':
                if value not in self.CONSOLE_TYPES:
                    raise ConsoleTypeNotSupported(value)
                if self.appliance.version < '5.8':
                    raise ConsoleNotSupported(
                        product_name=self.appliance.product_name,
                        version=self.appliance.version)
        updated = view.vmware_console.fill(updates)
        self._save_action(view, updated, reset)