futuregrid / cloud-metrics

Project to create usage statistics from IaaS such as OpenStack, Eucalyptus, and Nimbus
2 stars 3 forks source link

JSON import / export function #106

Open lee212 opened 11 years ago

lee212 commented 11 years ago

As a part of shell command developments, Import/Export Python dictionary data structure need to be added. There must at least 4 main dicts to import/export because Cloud Metrics has 4 main database tables: instances, userinfo, projectinfo, and hostinfo.

data: {
  instances:{ ... },
  userinfo: { ... },
  projectinfo: { ... },
  hostinfo: { ... }
}

Usage of import/export cmd functions

fg-metric> import --filename filename.JSON
... filename.JSON imported ...

fg-metric> export --filename filename.JSON
... filename.JSON exported ...