Developer View for Sunstone

Hello
We have an opennebula zone for our developers and for testing and reproducing error they need to run and falling back . the easiest option is Snapshot and snapshot is not in Sunstone user view .

how can i fork user view and create a new one called developer view model with ability to snapshot and revert ?

i can write a script with python and opennebula api but i think if we gonna spend time why not working on sunstone maybe some else need that too and other reason to not do that is we lost our integration so our developers need to use more than one management system .

i dont know ruby very much but i think its not difficult for a python programmers to edit codes just i need to know the structure of sunstone backend to study and develope what i need

thank you and sorry for my poor english

Hi,

The user view actually has the system snapshots enabled by default. To customize the available actions of each view, simply follow the documentation:
http://docs.opennebula.org/4.14/administration/sunstone_gui/suns_views.html

snapshot by meaning saveing a template yes
i already checked the user_view yml file sections are enabled but user cant access to them
i mean the live snapshot available in admin view and reverting .
now this little script help me to revert and create snapshot for a user and its written in 5 minutes :slight_smile:
i want to have this ability in sunstone when a user logged in in his/her account

#!/usr/bin/env python2
import os, xmlrpclib, re
import xml.etree.ElementTree as ET
ONE_AUTH="user:password"
server = xmlrpclib.ServerProxy('http://ipaddress:2633/RPC2')
print "This script show you all servers ID with state (Active):"
pool = server.one.vmpool.info(ONE_AUTH,-2,-1,-1,3)
pool = ET.fromstring(pool[1])
#print pool[1].rsplit('<ID>')[1].rsplit('</ID>')[0]
for tags in pool.findall('VM'):
        vmid = tags.find('ID').text
        vmname = tags.find('NAME').text
        print "VM : "+vmid+":"+vmname
print ''' What do you want me to do ?
        1 : Snapshot
        2 : Revert'''
action = int(raw_input("Action :"))
if action == 1:
        print "Remember the snapshot id for revert"
        vmid = int(raw_input("Enter VMID :"))
        print server.one.vm.snapshotcreate(ONE_AUTH,vmid,"")
elif action == 2:

        snapid = int(raw_input("Snapshot ID :"))
        print server.one.vm.snapshotrevert(ONE_AUTH,vmid,snapid)
else:
        print "Error please restart the program again"