Feature #799
Refactor opennebula.js, ozones.js code
Status: | Closed | Start date: | 09/08/2011 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Hector Sanjuan | % Done: | 100% | |
Category: | Sunstone | |||
Target version: | Release 3.0 | |||
Resolution: | fixed | Pull request: |
Description
There is too much duplicate code and at least some functions could well be groupped into a single one..
Associated revisions
Feature #799: opennebula.js refactor
This commit contains a full refactoring of opennebula.js, the Javascript API to interact with Sunstone server.
Refactoring includes some other smaller changes in order to achieve consistency:
- SunstoneServer.rb: vm logs are returned in JSON format instead of plain text. VM template resource is now accessed via "/vmtemplate" instead of "template".
- Images plugin: update "register" references to "create".
- VM plugin: update VM log processing. Improve the "saveas" action object, making it a standard "single" action instead of "custom".
Feature #799: Put action request helpers as "OpenNebula.Action" / Fix chgrp
This way they are separated from original helpers in OpenNebula.Helper, as their function is different.
Additionally, a the chgrp action has been fixed.
Feature #799: Refactor ozones.js code
This commit refactors the code in ozone.js.
In order to allow as much refactoring as possible, server and zones plugin have been modified so that a better consistency is achieved:
- "vnet" replaces "vn" to identify virtual networks resource.
- "vmtemplate" replaces "template" to identify virtual machine templates.
In the server side, all "vnet", "vn" / "vmtemplate", "template" produce the same result, so that the CLI spec and oZones doc are not affected by this change.
Note: Additional changes on OzonesServer.rb correspond to whitespace cleanup.
History
#1 Updated by Hector Sanjuan almost 10 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
- Resolution set to fixed