def _create_capabilities_list(self, capabilities):
        """

        :param capabilities:
        :return capabilities_list:
        """
        capabilities_list = []

        if isinstance(capabilities, six.string_types):
            if capabilities.upper() in VALID_CAPABILITIES:
                capabilities_list.append(capabilities)
            else:
                raise ValueError(
                    "cap add must be one of the following VALID_CAPABILITIES: {0}".format(", ".join(VALID_CAPABILITIES))
                )

        elif isinstance(capabilities, list):
            for capability in capabilities:
                if capability.upper() in VALID_CAPABILITIES:
                    capabilities_list.append(capability)
                else:
                    raise ValueError(
                        "cap add must be one of the following VALID_CAPABILITIES: {0}".format(
                            ", ".join(VALID_CAPABILITIES)
                        )
                    )
        else:
            raise ValueError("cap add must be a string, list")

        return capabilities_list
def _create_capabilities_list ( self , capabilities ) : capabilities_list = [ ] if isinstance ( capabilities , six . string_types ) : if capabilities . upper ( ) in VALID_CAPABILITIES : capabilities_list . append ( capabilities ) else : raise ValueError ( "cap add must be one of the following VALID_CAPABILITIES: {0}" . format ( ", " . join ( VALID_CAPABILITIES ) ) ) elif isinstance ( capabilities , list ) : for capability in capabilities : if capability . upper ( ) in VALID_CAPABILITIES : capabilities_list . append ( capability ) else : raise ValueError ( "cap add must be one of the following VALID_CAPABILITIES: {0}" . format ( ", " . join ( VALID_CAPABILITIES ) ) ) else : raise ValueError ( "cap add must be a string, list" ) return capabilities_list
:param capabilities:
        :return capabilities_list: