software_configs.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:eclcli 作者: nttcom 项目源码 文件源码
def list(self, **kwargs):
        """Get a list of software configs.

        :rtype: list of :class:`SoftwareConfig`
        """
        qparams = {}

        for opt, val in six.iteritems(kwargs):
            if val:
                qparams[opt] = val

        # Transform the dict to a sequence of two-element tuples in fixed
        # order, then the encoded string will be consistent in Python 2&3.
        if qparams:
            new_qparams = sorted(qparams.items(), key=lambda x: x[0])
            query_string = "?%s" % parse.urlencode(new_qparams)
        else:
            query_string = ""
        url = '/software_configs%s' % query_string
        return self._list(url, "software_configs")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号