dellemc.openmanage.ome_chassis_slots (9.1.0) — module

Rename sled slots on OpenManage Enterprise Modular

| "added in version" 3.6.0 of dellemc.openmanage"

Authors: Jagadeesh N V(@jagadeeshnv)

Install collection

Install with ansible-galaxy collection install dellemc.openmanage:==9.1.0


Add to requirements.yml

  collections:
    - name: dellemc.openmanage
      version: 9.1.0

Description

This module allows to rename sled slots on OpenManage Enterprise Modular either using device id or device service tag or using chassis service tag and slot number.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
---
- name: Rename the slots in multiple chassis using slot number and chassis service tag
  dellemc.openmanage.ome_chassis_slots:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    slot_options:
      - chassis_service_tag: ABC1234
        slots:
          - slot_number: 1
            slot_name: sled_name_1
          - slot_number: 2
            slot_name: sled_name_2
      - chassis_service_tag: ABC1235
        slots:
          - slot_number: 1
            slot_name: sled_name_1
          - slot_number: 2
            slot_name: sled_name_2
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Rename single slot name of the sled using sled ID
  dellemc.openmanage.ome_chassis_slots:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    device_options:
      - device_id: 10054
        slot_name: slot_device_name_1
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Rename single slot name of the sled using sled service tag
  dellemc.openmanage.ome_chassis_slots:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    device_options:
      - device_service_tag: ABC1234
        slot_name: service_tag_slot
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Rename multiple slot names of the devices
  dellemc.openmanage.ome_chassis_slots:
    hostname: "192.168.0.1"
    username: "username"
    password: "password"
    ca_path: "/path/to/ca_cert.pem"
    device_options:
      - device_id: 10054
        slot_name: sled_name_1
      - device_service_tag: ABC1234
        slot_name: sled_name_2
      - device_id: 10055
        slot_name: sled_name_3
      - device_service_tag: PQR1234
        slot_name: sled_name_4

Inputs

    
port:
    default: 443
    description: OpenManage Enterprise Modular HTTPS port.
    type: int

ca_path:
    description:
    - The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for
      the validation.
    type: path
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

timeout:
    default: 30
    description: The socket level timeout in seconds.
    type: int
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

hostname:
    description: OpenManage Enterprise Modular IP address or hostname.
    required: true
    type: str

password:
    description:
    - OpenManage Enterprise Modular password.
    - If the password is not provided, then the environment variable C(OME_PASSWORD) is
      used.
    - 'Example: export OME_PASSWORD=password'
    required: true
    type: str

username:
    description:
    - OpenManage Enterprise Modular username.
    - If the username is not provided, then the environment variable C(OME_USERNAME) is
      used.
    - 'Example: export OME_USERNAME=username'
    required: true
    type: str

slot_options:
    description:
    - The service tag of the chassis, slot number of the slot to be renamed, and the new
      name for the slot.
    - I(slot_options) is mutually exclusive with I(device_options).
    elements: dict
    suboptions:
      chassis_service_tag:
        description: Service tag of the chassis.
        required: true
        type: str
      slots:
        description:
        - The slot number and the new name for the slot.
        elements: dict
        required: true
        suboptions:
          slot_name:
            description: Provide name for the slot.
            required: true
            type: str
          slot_number:
            description: The slot number of the slot to be renamed.
            required: true
            type: int
        type: list
    type: list

device_options:
    description:
    - The ID or service tag of the sled in the slot and the new name for the slot.
    - I(device_options) is mutually exclusive with I(slot_options).
    elements: dict
    suboptions:
      device_id:
        description:
        - Device ID of the sled in the slot.
        - This is mutually exclusive with I(device_service_tag).
        type: int
      device_service_tag:
        description:
        - Service tag of the sled in the slot.
        - This is mutually exclusive with I(device_id).
        type: str
      slot_name:
        description: Provide name for the slot.
        required: true
        type: str
    type: list

validate_certs:
    default: true
    description:
    - If C(false), the SSL certificates will not be validated.
    - Configure C(false) only on personally controlled sites where self-signed certificates
      are used.
    - Prior to collection version C(5.0.0), the I(validate_certs) is C(false) by default.
    type: bool
    version_added: 5.0.0
    version_added_collection: dellemc.openmanage

Outputs

error_info:
  description: Details of the HTTP Error.
  returned: on HTTP error
  sample:
    error:
      '@Message.ExtendedInfo':
      - Message: 'Unable to complete the operation because an invalid value is entered
          for the property Invalid json type: STRING for Edm.Int64 property: Id .'
        MessageArgs:
        - 'Invalid json type: STRING for Edm.Int64 property: Id'
        MessageId: CGEN1014
        RelatedProperties: []
        Resolution: Enter a valid value for the property and retry the operation.
          For more information about valid values, see the OpenManage Enterprise-Modular
          User's Guide available on the support site.
        Severity: Critical
      code: Base.1.0.GeneralError
      message: A general error has occurred. See ExtendedInfo for more information.
  type: dict
msg:
  description: Overall status of the slot rename operation.
  returned: always
  sample: Successfully renamed the slot(s).
  type: str
rename_failed_slots:
  description:
  - Information of the valid slots that are not renamed.
  - C(JobStatus) is shown if rename job fails.
  - C(NOTE) Only slots which were not renamed are listed.
  elements: dict
  returned: if at least one slot renaming fails
  sample:
  - ChassisId: '12345'
    ChassisName: MX-ABCD123
    ChassisServiceTag: ABCD123
    DeviceType: '4000'
    JobId: 1234
    JobStatus: Aborted
    SlotId: '10061'
    SlotName: c2
    SlotNumber: '1'
    SlotType: '4000'
  - ChassisId: '10053'
    ChassisName: MX-PQRS123
    ChassisServiceTag: PQRS123
    DeviceType: '1000'
    JobId: 0
    JobStatus: 'HTTP Error 400: Bad Request'
    SlotId: '10069'
    SlotName: b2
    SlotNumber: '3'
    SlotType: '2000'
  type: list
slot_info:
  description:
  - Information of the slots that are renamed successfully.
  - The C(DeviceServiceTag) and C(DeviceId) options are available only if I(device_options)
    is used.
  - C(NOTE) Only the slots which were renamed are listed.
  elements: dict
  returned: if at least one slot renamed
  sample:
  - ChassisId: 10053
    ChassisServiceTag: ABCD123
    DeviceName: ''
    DeviceType: 1000
    JobId: 15746
    SlotId: '10072'
    SlotName: slot_op2
    SlotNumber: '6'
    SlotType: 2000
  - ChassisId: 10053
    ChassisName: MX-ABCD123
    ChassisServiceTag: ABCD123
    DeviceType: '3000'
    JobId: 15747
    SlotId: '10070'
    SlotName: slot_op2
    SlotNumber: '4'
    SlotType: '2000'
  - ChassisId: '10053'
    ChassisName: MX-PQRS123
    ChassisServiceTag: PQRS123
    DeviceId: '10054'
    DeviceServiceTag: XYZ5678
    DeviceType: '1000'
    JobId: 15761
    SlotId: '10067'
    SlotName: a1
    SlotNumber: '1'
    SlotType: '2000'
  type: list