TicketManager

class SoftLayer.managers.TicketManager(client)[source]

Manages SoftLayer support tickets.

See product information here: https://www.ibm.com/cloud/support

Parameters:

client (SoftLayer.API.BaseClient) – the client instance

__init__(client)[source]

Methods

__init__(client)

attach_hardware([ticket_id, hardware_id])

Attach hardware to a ticket.

attach_virtual_server([ticket_id, virtual_id])

Attach a virtual server to a ticket.

create_ticket([title, body, subject, priority])

Create a new ticket.

detach_hardware([ticket_id, hardware_id])

Detach hardware from a ticket.

detach_virtual_server([ticket_id, virtual_id])

Detach a virtual server from a ticket.

get_ticket(ticket_id)

Get details about a ticket.

list_subjects()

List all ticket subjects.

list_tickets([open_status, closed_status, ...])

List all tickets.

resolve_ids(identifier)

Takes a string and tries to resolve to a list of matching ids.

update_ticket([ticket_id, body])

Update a ticket.

upload_attachment([ticket_id, file_path, ...])

Upload an attachment to a ticket.

Attributes

resolvers

attach_hardware(ticket_id=None, hardware_id=None)[source]

Attach hardware to a ticket.

Parameters:
  • ticket_id (integer) – the id of the ticket to attach to

  • hardware_id (integer) – the id of the hardware to attach

Returns:

dict – The new ticket attachment

attach_virtual_server(ticket_id=None, virtual_id=None)[source]

Attach a virtual server to a ticket.

Parameters:
  • ticket_id (integer) – the id of the ticket to attach to

  • virtual_id (integer) – the id of the virtual server to attach

Returns:

dict – The new ticket attachment

create_ticket(title=None, body=None, subject=None, priority=None)[source]

Create a new ticket.

Parameters:
  • title (string) – title for the new ticket

  • body (string) – body for the new ticket

  • subject (integer) – id of the subject to be assigned to the ticket

  • priority (integer) – Value from 1 (highest) to 4 (lowest)

detach_hardware(ticket_id=None, hardware_id=None)[source]

Detach hardware from a ticket.

Parameters:
  • ticket_id – the id of the ticket to detach from

  • hardware_id – the id of the hardware to detach

Returns:

bool – Whether the detachment was successful

detach_virtual_server(ticket_id=None, virtual_id=None)[source]

Detach a virtual server from a ticket.

Parameters:
  • ticket_id – the id of the ticket to detach from

  • virtual_id – the id of the virtual server to detach

Returns:

bool – Whether the detachment was successful

get_ticket(ticket_id)[source]

Get details about a ticket.

Parameters:

ticket_id (integer) – the ticket ID

Returns:

dict – information about the specified ticket

list_subjects()[source]

List all ticket subjects.

list_tickets(open_status=True, closed_status=True, limit=None, all_tickets=False)[source]

List all tickets.

Parameters:
  • open_status (boolean) – include open tickets

  • closed_status (boolean) – include closed tickets

  • limit (int) – result limit

resolve_ids(identifier)

Takes a string and tries to resolve to a list of matching ids.

What exactly ‘identifier’ can be depends on the resolvers

Parameters:

identifier (string) – identifying string

Returns list:

update_ticket(ticket_id=None, body=None)[source]

Update a ticket.

Parameters:
  • ticket_id (integer) – the id of the ticket to update

  • body (string) – entry to update in the ticket

upload_attachment(ticket_id=None, file_path=None, file_name=None)[source]

Upload an attachment to a ticket.

Parameters:
  • ticket_id (integer) – the id of the ticket to upload the attachment to

  • file_path (string) – The path of the attachment to be uploaded

  • file_name (string) – The name of the attachment shown in the ticket

Returns:

dict – The uploaded attachment