one icon indicating copy to clipboard operation
one copied to clipboard

Vcenter driver Import rework

Open Semedi opened this issue 8 years ago • 1 comments

Enhancement Request

Description

Vcenter driver is completely splitted for Sunstone and CLI.

This structure breaks any architecture process and make any way of development very tedious. Also de driver itself has 0 scalability.

Design changes

Sunstone

  • should not have standalone code regarding any vcenter operation.
  • The correct behaviour for sunstone will be to make clean calls to the importer (vcenter_driver).
  • Sunstone can browse directly into opennebula core in the case of expensive operations.

Code

vcenter.rb (backend)

resource = network || template || wild || datastore

  • get /vcenter/< resource > Should return a list with the available networks ready to import and some info.

  • post /vcenter/import/< resource > Should be called knowing the list of that u want to import, the list format may vary. The idea is to build a selected json list in Sunstone, result of the previous call.

host

  • get /vcenter/cluster should return a list with importable hosts
  • post /vcenter/import/cluster Will be used to import a cluster, the user won't have the possibility to import more than 1 host/opennebula cluster at the same time, the user will choose between create a new opennebula cluster or attach the host to a selected one,

CLI

Code

onevcenter_helper.rb should be created. This helper will aid onevcenter to display text over the cli. To achieve that, the helper will call importer.rb methods

importer.rb The purpose of this part of the driver will be to have the proper methods regarding any import operation. The importer should not write in stdout.

vCenter Driver

  • Code restructure for import operations, we need to have fully organized the methods used for import operations into importer.rb

Flow example

Import networks: retrieve the list (GUI) User (Sunstone) selects import_networks -> vcenter.rb(ruby_back) -> importer.rb => Sunstone

CLI User (onevcenter) -> onevcenter_helper.rb -> importer.rb

Progress Status

Semedi avatar Jan 16 '18 08:01 Semedi

Development tracked in issue #1884

rsmontero avatar Apr 23 '18 13:04 rsmontero