# Path: pyeapi/utils.py
# def make_iterable(value):
#     """Converts the supplied value to a list object
# 
#     This function will inspect the supplied value and return an
#     iterable in the form of a list.
# 
#     Args:
#         value (object): An valid Python object
# 
#     Returns:
#         An iterable object of type list
#     """
#     if sys.version_info <= (3, 0):
#         # Convert unicode values to strings for Python 2
#         if isinstance(value, unicode):
#             value = str(value)
#     if isinstance(value, str) or isinstance(value, dict):
#         value = [value]
# 
#     if sys.version_info <= (3, 3):
#         if not isinstance(value, collections.Iterable):
#             raise TypeError('value must be an iterable object')
#     else:
#         if not isinstance(value, collections.abc.Iterable):
#             raise TypeError('value must be an iterable object')
# 
#     return value


import sys
import json
import socket
import base64
import logging
import ssl
import re
    from http.client import HTTPConnection, HTTPSConnection
    from httplib import HTTPConnection, HTTPSConnection
from pyeapi.utils import make_iterable
        .. code-block:: json

            {
                "jsonrpc": "2.0",
                "method": "runCmds",
                "params": {
                    "version": 1,
                    "cmds": [
                        <commands>
                    ],
                    "format": [json, text],
                }
                "id": <reqid>
            }

        Args:
            commands (list): A list of commands to include in the eAPI
                request object
            encoding (string): The encoding method passed as the `format`
                parameter in the eAPI request
            reqid (string): A custom value to assign to the request ID
                field.  This value is automatically generated if not passed
            **kwargs: Additional keyword arguments for expanded eAPI
                functionality. Only supported eAPI params are used in building
                the request

        Returns:
            A JSON encoding request structure that can be send over eAPI

        """

# Path: pyeapi/utils.py
# def make_iterable(value):
#     """Converts the supplied value to a list object
# 
#     This function will inspect the supplied value and return an
#     iterable in the form of a list.
# 
#     Args:
#         value (object): An valid Python object
# 
#     Returns:
#         An iterable object of type list
#     """
#     if sys.version_info <= (3, 0):
#         # Convert unicode values to strings for Python 2
#         if isinstance(value, unicode):
#             value = str(value)
#     if isinstance(value, str) or isinstance(value, dict):
#         value = [value]
# 
#     if sys.version_info <= (3, 3):
#         if not isinstance(value, collections.Iterable):
#             raise TypeError('value must be an iterable object')
#     else:
#         if not isinstance(value, collections.abc.Iterable):
#             raise TypeError('value must be an iterable object')
# 
#     return value


# Path: pyeapi/eapilib.py
import sys
import json
import socket
import base64
import logging
import ssl
import re
    from http.client import HTTPConnection, HTTPSConnection
    from httplib import HTTPConnection, HTTPSConnection
from pyeapi.utils import make_iterable

        .. code-block:: json

            {
                "jsonrpc": "2.0",
                "method": "runCmds",
                "params": {
                    "version": 1,
                    "cmds": [
                        <commands>
                    ],
                    "format": [json, text],
                }
                "id": <reqid>
            }

        Args:
            commands (list): A list of commands to include in the eAPI
                request object
            encoding (string): The encoding method passed as the `format`
                parameter in the eAPI request
            reqid (string): A custom value to assign to the request ID
                field.  This value is automatically generated if not passed
            **kwargs: Additional keyword arguments for expanded eAPI
                functionality. Only supported eAPI params are used in building
                the request

        Returns:
            A JSON encoding request structure that can be send over eAPI

        """

        commands = make_iterable(commands)