Embed presentation
Downloaded 88 times


























![Making API callsCan be authenticated or not.HTTP call.User Keys can be generated via the GUIBase url: http://<manager-host>:8080/client/api?….def make_request(requests, secretKey): request = zip(requests.keys(), requests.values()) request.sort(key=lambda x: str.lower(x[0])) requestUrl = "&".join(["=".join([r[0], urllib.quote_plus(str(r[1]))]) for r in request]) hashStr = "&".join(["=".join([str.lower(r[0]),str.lower(urllib.quote_plus(str(r[1]))).replace("+", "%20")]) for r in request]) sig = urllib.quote_plus(base64.encodestring(hmac.new(secretKey, hashStr,hashlib.sha1).digest()).strip()) print "Signature: %s"%sig requestUrl += "&signature=%s"%sig print requestUrlif __name__ == '__main__': requests = { "apiKey": "BRZ5j4E8O4di2MZWnQsYBLThCrTGO-LGeZaMjsnvelkHuY5P8FdTnluNZTDQhCUy-wqeJzk8EAc_NbcZxTF_FA", "response" : "json", "command" : "listZones" } secretKey = "bFlx2llt3OmM4AiHzfwV1ZbuJ5tsv6hAx6IeM32CkM-obCA77BRwBr3_yQ0bO1-kdZyfD3-lY6khsXCx18n3Mw" make_request(requests, secretKey)](/image.pl?url=https%3a%2f%2fimage.slidesharecdn.com%2fcs-genevajug-121030093641-phpapp01%2f75%2fCloudStack-for-Java-User-Group-27-2048.jpg&f=jpg&w=240)








![Testing Framework –for the PyUG [environment]• Marvin is a Python dns=10.147.28.6 mshost=10.147.39.69 based framework to run mysql.host=10.147.39.69 tests against a [cloudstack] private.gateway=10.147.40.1 CloudStack install private.pod.startip=10.147.41.121 private.pod.endip=10.147.41.160• Could be used as a private.netmask=255.255.254.0 public.gateway=10.147.40.1 simulator of a public.vlan.startip=10.147.41.162 datacenter public.vlan.endip=10.147.41.200 public.netmask=255.255.254.0• Used to configure an hypervisor=XenServer host=10.147.40.10 infrastructure on a mgt host.password=password #storage pools server primary.pool=nfs://10.147.28.7:/expo rt/home/automation/sadhu/primary secondary.pool=nfs://10.147.28.6:/ex port/home/automation/sadhu/secondary](/image.pl?url=https%3a%2f%2fimage.slidesharecdn.com%2fcs-genevajug-121030093641-phpapp01%2f75%2fCloudStack-for-Java-User-Group-36-2048.jpg&f=jpg&w=240)



Apache CloudStack is an open-source Infrastructure as a Service (IaaS) platform initiated by VMops, later acquired by Citrix, and accepted into the Apache Incubator in 2012. With a focus on community-driven development and contributions from various organizations, CloudStack supports complex networking and is hypervisor-agnostic, allowing for extensive customization and integration. The platform aims to facilitate fast adoption in enterprise environments by providing an open-source solution desired by users and developers alike.


























![Making API callsCan be authenticated or not.HTTP call.User Keys can be generated via the GUIBase url: http://<manager-host>:8080/client/api?….def make_request(requests, secretKey): request = zip(requests.keys(), requests.values()) request.sort(key=lambda x: str.lower(x[0])) requestUrl = "&".join(["=".join([r[0], urllib.quote_plus(str(r[1]))]) for r in request]) hashStr = "&".join(["=".join([str.lower(r[0]),str.lower(urllib.quote_plus(str(r[1]))).replace("+", "%20")]) for r in request]) sig = urllib.quote_plus(base64.encodestring(hmac.new(secretKey, hashStr,hashlib.sha1).digest()).strip()) print "Signature: %s"%sig requestUrl += "&signature=%s"%sig print requestUrlif __name__ == '__main__': requests = { "apiKey": "BRZ5j4E8O4di2MZWnQsYBLThCrTGO-LGeZaMjsnvelkHuY5P8FdTnluNZTDQhCUy-wqeJzk8EAc_NbcZxTF_FA", "response" : "json", "command" : "listZones" } secretKey = "bFlx2llt3OmM4AiHzfwV1ZbuJ5tsv6hAx6IeM32CkM-obCA77BRwBr3_yQ0bO1-kdZyfD3-lY6khsXCx18n3Mw" make_request(requests, secretKey)](/image.pl?url=https%3a%2f%2fimage.slidesharecdn.com%2fcs-genevajug-121030093641-phpapp01%2f75%2fCloudStack-for-Java-User-Group-27-2048.jpg&f=jpg&w=240)








![Testing Framework –for the PyUG [environment]• Marvin is a Python dns=10.147.28.6 mshost=10.147.39.69 based framework to run mysql.host=10.147.39.69 tests against a [cloudstack] private.gateway=10.147.40.1 CloudStack install private.pod.startip=10.147.41.121 private.pod.endip=10.147.41.160• Could be used as a private.netmask=255.255.254.0 public.gateway=10.147.40.1 simulator of a public.vlan.startip=10.147.41.162 datacenter public.vlan.endip=10.147.41.200 public.netmask=255.255.254.0• Used to configure an hypervisor=XenServer host=10.147.40.10 infrastructure on a mgt host.password=password #storage pools server primary.pool=nfs://10.147.28.7:/expo rt/home/automation/sadhu/primary secondary.pool=nfs://10.147.28.6:/ex port/home/automation/sadhu/secondary](/image.pl?url=https%3a%2f%2fimage.slidesharecdn.com%2fcs-genevajug-121030093641-phpapp01%2f75%2fCloudStack-for-Java-User-Group-36-2048.jpg&f=jpg&w=240)

