netmilk / deltacloud_js

Deltacloud API javascript client

Home Page:deltacloud_js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Deltacloud API javascript client

##Example connect:

d = new Deltacloud(url, username, password)

create instance:

api.create_instance({image_id: 5, hwp_id: 2476,realm_id: "prague-l1-personal",name: "scout"})

d.instances()

actions:

d.instances()[1].actions

perform action:

d.instances()[1].reboot()

d.images()

d.realms()

d.harware_profiles()

d.instance(id)

d.image(id)

d.realm(id)

d.hardware_profile(id)

example how to access cache:

d.cache.instances

d.cache.images

etc...

##TODO

  • create new instance
  • TEST perform actions on instances
  • more DRYer solution for: sanitizing first level of response to array, returning first level of every single object
  • try to eradicate Base64 library used for assembling http basic auth header
  • eradicate jQuery
  • consider to have declared class for each member of instance,image,hwp,realm
  • driver is mistycally blockong preceding actions, try to resolve eg. show loading modal window - it's killing user experience
  • remove "magic" timestamp from url /services/deltacloud/instances?_=1301792300944
  • toggle sync / async mode, add callbacs to async mode
  • consider declare functions dynamicaly from api capabilities

About

Deltacloud API javascript client

deltacloud_js


Languages

Language:JavaScript 100.0%