Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ovirt_vm: Add new suboptions to graphical_console #63230

Merged
merged 1 commit into from
Oct 8, 2019

Conversation

machacekondra
Copy link
Contributor

Fixes: #63225

This PR add following new suboptions to graphical_console param:

  • keyboard_layout
  • monitors
  • disconnect_action
SUMMARY
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ovirt_vm

ADDITIONAL INFORMATION

@ansibot
Copy link
Contributor

ansibot commented Oct 8, 2019

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/cloud/ovirt/ovirt_vm.py:0:0: invalid-documentation: DOCUMENTATION.options.graphical_console.suboptions.disconnect_action.description.0: expected str @ data['options']['graphical_console']['suboptions']['disconnect_action']['description'][0]. Got {'Returns the action that will take place when the graphic console(SPICE only) is disconnected. The options are': None}

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/cloud/ovirt/ovirt_vm.py:1285:1: E302: expected 2 blank lines, found 1

click here for bot help

@ansibot
Copy link
Contributor

ansibot commented Oct 8, 2019

@ansibot ansibot added affects_2.10 This issue/PR affects Ansible v2.10 ci_verified Changes made in this PR are causing tests to fail. cloud feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. ovirt oVirt and RHV community owner_pr This PR is made by the module's maintainer. support:community This issue/PR relates to code supported by the Ansible community. labels Oct 8, 2019
Fixes: ansible#63225

This PR add following new suboptions to graphical_console param:

  - keyboard_layout
  - monitors
  - disconnect_action
Copy link
Contributor

@mnecas mnecas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@ansibot ansibot added automerge This PR was automatically merged by ansibot. shipit This PR is ready to be merged by Core and removed ci_verified Changes made in this PR are causing tests to fail. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. needs_triage Needs a first human triage before being processed. labels Oct 8, 2019
@ansibot ansibot merged commit 35c3d83 into ansible:devel Oct 8, 2019
@knumskull
Copy link
Contributor

Is there anything additional to do, when I would like to try this features?

I tested with ansible-2.9.0rc2 but still getting following error:

The full traceback is:                                     
Traceback (most recent call last):                         
  File "/tmp/ansible_ovirt_vm_payload_KT9pC1/ansible_ovirt_vm_payload.zip/ansible/modules/ovirt_vm.py", line 2497, in main
  File "/tmp/ansible_ovirt_vm_payload_KT9pC1/ansible_ovirt_vm_payload.zip/ansible/module_utils/ovirt.py", line 599, in create
    self.post_update(entity)                               
  File "/tmp/ansible_ovirt_vm_payload_KT9pC1/ansible_ovirt_vm_payload.zip/ansible/modules/ovirt_vm.py", line 1651, in post_update
  File "/tmp/ansible_ovirt_vm_payload_KT9pC1/ansible_ovirt_vm_payload.zip/ansible/modules/ovirt_vm.py", line 1661, in post_present
  File "/tmp/ansible_ovirt_vm_payload_KT9pC1/ansible_ovirt_vm_payload.zip/ansible/modules/ovirt_vm.py", line 1838, in __attach_graphical_console
  File "/usr/lib/python2.7/site-packages/enum/__init__.py", line 330, in __call__                                      
    return cls.__new__(cls, value)                                                                                     
  File "/usr/lib/python2.7/site-packages/enum/__init__.py", line 642, in __new__                                       
    raise ValueError("%s is not a valid %s" % (value, cls.__name__))                                                   
ValueError: ['vnc'] is not a valid GraphicsType 
fatal: [rhv-m.crazy.lab]: FAILED! => {                                                                   
    "changed": false,                                                                                    
    "invocation": {                                                                                      
        "module_args": {                                                                                 
            "affinity_group_mappings": [],                                                               
            "affinity_label_mappings": [],                                                               
            "allow_partial_import": null,                                                                
            "ballooning_enabled": null,                                                                  
            "boot_devices": null,                                                                        
            "boot_menu": null,                                                                           
            "cd_iso": null,                                                                              
            "clone": false,                                                                              
            "clone_permissions": false,                                                                  
            "cloud_init": null,                                                                          
            "cloud_init_nics": [],                                                                       
            "cloud_init_persist": false,                                                                 
            "cluster": "Default",                                                                        
            "cluster_mappings": [],                                                                      
            "comment": "nocomment",                                                                      
            "cpu_cores": 4,                                                                              
            "cpu_mode": null,                                                                            
            "cpu_pinning": null,                                                                         
            "cpu_shares": null,                                                                          
            "cpu_sockets": null,                                                                         
            "cpu_threads": null,                                                                         
            "custom_compatibility_version": null,                                                        
            "custom_emulated_machine": null,                                                             
            "custom_properties": null,                                                                   
            "delete_protected": null,                                                                    
            "description": null,                                                                         
            "disk_format": "cow",                                                                        
            "disks": [],                                                                                 
            "domain_mappings": [],                                                                       
            "exclusive": null,                                                                           
            "export_domain": null,                                                                       
            "export_ova": null,                                                                          
            "fetch_nested": false,                                                                       
            "force": false,                                                                              
            "force_migrate": null,                                                                       
            "graphical_console": {                                                                       
                "disconnect_action": null,                                                               
                "headless_mode": null,                                                                   
                "keyboard_layout": "de",                                                                 
                "monitors": null,                                                                        
                "protocol": "['vnc']"                                                                    
            },                                                                                           
            "high_availability": null,                                                                   
            "high_availability_priority": null,                                                          
            "host": null,                                                                                
            "host_devices": null,                                                                        
            "id": null,                                                                                  
            "initrd_path": null,                                                                         
            "instance_type": null,                                                                       
            "io_threads": null,                                                                          
            "kernel_params": null,                                                                       
            "kernel_params_persist": false,                                                              
            "kernel_path": null,                                                                         
            "kvm": null,                                                                                 
            "lease": null,                                                                               
            "lun_mappings": [],                                                                          
            "memory": "8GiB",                                                                            
            "memory_guaranteed": "4GiB",                                                                 
            "memory_max": null,                                                                          
            "migrate": null,                                                                             
            "name": "testvm",                                                                            
            "nested_attributes": [],                                                                     
            "next_run": null,                                                                            
            "nics": [],                                                                                  
            "numa_nodes": [],                                                                            
            "numa_tune_mode": null,                                                                      
            "operating_system": "rhel_7x64",                                                             
            "placement_policy": null,                                                                    
            "poll_interval": 3,                                                                          
            "quota_id": null,                                                                            
            "reassign_bad_macs": null,                                                                   
            "rng_device": null,                                                                          
            "role_mappings": [],                                                                         
            "serial_console": null,                                                                      
            "serial_policy": null,                                                                       
            "serial_policy_value": null,                                                                 
            "smartcard_enabled": null,                                                                   
            "snapshot_name": null,                                                                       
            "snapshot_vm": null,                                                                         
            "soundcard_enabled": null,                                                                   
            "sso": null,                                                                                 
            "state": "present",                                                                          
            "stateless": null,                                                                           
            "storage_domain": null,                                                                      
            "sysprep": null,                                                                             
            "template": null,                                                                            
            "template_version": null,                                                                    
            "ticket": null,                                                                              
            "timeout": 180,                                                                              
            "timezone": null,                                                                            
            "type": "server",                                                                            
            "usb_support": null,                                                                         
            "use_latest_template_version": null,                                                         
            "vmware": null,                                                                              
            "vnic_profile_mappings": [],                                                                 
            "wait": true,                                                                                
            "watchdog": null,                                                                            
            "xen": null                                                                                  
        }                                                                                                
    },                                                                                                   
    "msg": "['vnc'] is not a valid GraphicsType"                                                   

playbook

---
- hosts: rhv-m.crazy.lab
  become: yes

  tasks:
    - block:
      - name: obtain SSO token
        no_log: false
        ovirt_auth: "{{ ovirt_auth }}"

      - name: create vm
        ovirt_vm:
          auth: "{{ ovirt_auth }}"
          cluster: Default
          name: testvm
          comment: nocomment
          cpu_cores: 4
          memory: 8GiB
          memory_guaranteed: 4GiB
          operating_system: rhel_7x64
          type: server
          graphical_console:
            protocol:
              - vnc
            keyboard_layout: 'de'

      always:
        - name: Revoke the SSO token
          ovirt_auth:
            state: absent
            ovirt_auth: "{{ ovirt_auth }}"
# ansible --version
ansible 2.9.0rc2
  config file = /root/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /root/ansible/venv/ansible-2.9/lib/python2.7/site-packages/ansible
  executable location = /root/ansible/venv/ansible-2.9/bin/ansible
  python version = 2.7.5 (default, Jun 11 2019, 14:33:56) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]

@ansible ansible locked and limited conversation to collaborators Nov 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.10 This issue/PR affects Ansible v2.10 automerge This PR was automatically merged by ansibot. cloud feature This issue/PR relates to a feature request. module This issue/PR relates to a module. ovirt oVirt and RHV community owner_pr This PR is made by the module's maintainer. shipit This PR is ready to be merged by Core support:community This issue/PR relates to code supported by the Ansible community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ovirt_vm] Provide possibility to change Display keyboard-layout
4 participants