Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/google-cloud-platform/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何使用java/python使用云堆栈API?_Java_Python_Stack_Cloud_Apache Cloudstack - Fatal编程技术网

如何使用java/python使用云堆栈API?

如何使用java/python使用云堆栈API?,java,python,stack,cloud,apache-cloudstack,Java,Python,Stack,Cloud,Apache Cloudstack,有没有办法将云堆栈API与java/python一起使用 在云堆栈文档中,它们只提供了有关API接口的信息。如何将这些API与编程语言一起使用 这可能对你有帮助 也看看他们的, 该页面也是一个很好的开始使用api的页面。这可能对您有所帮助 也看看他们的, 该页面也是一个很好的开始使用api的页面。CloudStack api可以使用 使用命令行界面(CLI)CloudMonkey- 使用Https请求- 使用CloudStack客户端- 我们可以发出两种类型的Http请求 使用端口8096的未经

有没有办法将云堆栈API与java/python一起使用

在云堆栈文档中,它们只提供了有关API接口的信息。如何将这些API与编程语言一起使用

这可能对你有帮助

也看看他们的,

该页面也是一个很好的开始使用api的页面。

这可能对您有所帮助

也看看他们的,


该页面也是一个很好的开始使用api的页面。

CloudStack api可以使用

使用命令行界面(CLI)CloudMonkey-

使用Https请求-

使用CloudStack客户端-

我们可以发出两种类型的Http请求

  • 使用端口8096的未经验证的API请求(使用管理UI打开端口8096)
  • 使用签名的经过身份验证的API请求
  • 创建签名的Python示例代码

    import urllib2
    import urllib // to make the url request 
    import hashlib              //encode it to http
    import hmac
    import base64      //encording 
    
    request={}
    request['command']='listUsers'
    request['response']='xml'
    request['apikey']='zdfhgsdhfgseahyg'
    secretkey='ghfgfgfg'
    
    >>> request
    {'apikey': 'plgWJfZK4gyS3mOMTVmjUVg-X-jlWlnfaUJ9GAbBbf9EdM-kAYMmAiLqzzq1ElZLYq_u38zCm0bewzGUdP66mg', 'command': 'listUsers', 'response': 'json'}
    
    >>>request_url="&".join(["=".join([r,urllib.quote_plus(request[r])]) for r in request.keys()])
    
    >>>sig_url="&".join(["=".join([r.lower(),urllib.quote_plus(request[r]).lower()]) for r in sorted(request.iterkeys())])
    
    >>>sig=urllib.quote_plus(base64.encodestring(hmac.new(secretkey,sig_url,hashlib.sha1).digest()).strip())
    
    >>> req=url+request_url+'&signature='+sig
    >>> res=urllib2.urlopen(req)
    >>> res.read()
    

    CloudStack API可以使用

    使用命令行界面(CLI)CloudMonkey-

    使用Https请求-

    使用CloudStack客户端-

    我们可以发出两种类型的Http请求

  • 使用端口8096的未经验证的API请求(使用管理UI打开端口8096)
  • 使用签名的经过身份验证的API请求
  • 创建签名的Python示例代码

    import urllib2
    import urllib // to make the url request 
    import hashlib              //encode it to http
    import hmac
    import base64      //encording 
    
    request={}
    request['command']='listUsers'
    request['response']='xml'
    request['apikey']='zdfhgsdhfgseahyg'
    secretkey='ghfgfgfg'
    
    >>> request
    {'apikey': 'plgWJfZK4gyS3mOMTVmjUVg-X-jlWlnfaUJ9GAbBbf9EdM-kAYMmAiLqzzq1ElZLYq_u38zCm0bewzGUdP66mg', 'command': 'listUsers', 'response': 'json'}
    
    >>>request_url="&".join(["=".join([r,urllib.quote_plus(request[r])]) for r in request.keys()])
    
    >>>sig_url="&".join(["=".join([r.lower(),urllib.quote_plus(request[r]).lower()]) for r in sorted(request.iterkeys())])
    
    >>>sig=urllib.quote_plus(base64.encodestring(hmac.new(secretkey,sig_url,hashlib.sha1).digest()).strip())
    
    >>> req=url+request_url+'&signature='+sig
    >>> res=urllib2.urlopen(req)
    >>> res.read()
    

    嗨,尼克,你能回答我的这个问题吗?嗨,尼克,你能回答我的这个问题吗?你好,鲁本,你能回答我的这个问题吗