testing

        :param name:
        :param image:
        :param hostname:
        :param networkmode: `class`:`str`, host | bridge
        :param ports: `class`:`list`, [{'type':'tcp', 'publicport':8080, 'privateport':80, 'ip':'0.0.0.0}]
        :param volumes: `class`:`list`, [{"containervolume":"/app-conf", "hostvolume":"/opt/app/app-conf"}]
        :param env: `class`:`list`, ["var=value", "var1=value1"]
        :param restartpolicy: `class`:`str`, always | on-failure | no(default)
        :param restartretrycount: 仅当 restartpolicy 是 on-failure 时才有用
        :param command:
        :return:

def create_container(self, name, image, hostname='dfis', networkmode='bridge', ports=None, volumes=None, env=None,
                         restartpolicy='no', restartretrycount='2', command=""):
        """testing

        :param name:
        :param image:
        :param hostname:
        :param networkmode: `class`:`str`, host | bridge
        :param ports: `class`:`list`, [{'type':'tcp', 'publicport':8080, 'privateport':80, 'ip':'0.0.0.0}]
        :param volumes: `class`:`list`, [{"containervolume":"/app-conf", "hostvolume":"/opt/app/app-conf"}]
        :param env: `class`:`list`, ["var=value", "var1=value1"]
        :param restartpolicy: `class`:`str`, always | on-failure | no(default)
        :param restartretrycount: 仅当 restartpolicy 是 on-failure 时才有用
        :param command:
        :return:
        """
        restartpolicy = restartpolicy.lower()
        repository, image_name, version = utils.parse_image_name(image)
        image = '{0}/{1}:{2}'.format(DOCKER_NEG, image_name, version)
        body = dict(name=name, image=image, hostname=hostname, networkmode=networkmode,
                    ports=ports or [],
                    volumes=volumes or [],
                    env=env or [],
                    restartpolicy=restartpolicy,
                    command=command)
        if restartpolicy == 'on-failure':
            body['restartretrycount'] = restartretrycount

        return "/dockerapi/v2/containers", body