| Higher understanding of reflect [message #79657] |
Fri, 11 February 2011 17:56  |
|
Edit: actually this is for hypervm, but kloxo is very much the same with other class names and options.
Hi there,
I believe, and correct me if there is some hidden information, that the hardest part to understand in reflect is the response of it. There are 1 or 2 topics explaining it, but I did not got it (mostly because they were all about --class=web).
When to use reflect --type=add, --type=action, --type=property?
Though, some things I still dont understand, here is what I got now:
For eg.:
./reflect --type=update --class=vps --name=boxname.vm
wont tell you anything. But if you try:
./reflect --type=action --class=vps
then you'll get back a long list, which most likely starts like this:
update_ostemplatelist Ostemplate List
update_timezone Set Timezone
update_boot Boot
graph_base Graphs
graph_traffic Traffic
[....]
update_limit Limit
[....]
If you take any action, that starts with update_, cut down update, you can use the update script to run that action.
Of course, you'll still have no clues about what to do with it.
Then (if you want to know what you run:
./reflect --type=update --class=vps --name=debianx.vm --subaction=limit
priv-disk_usage Disk:Disk Quota (MB)
priv-backup_num Backup:Number Of Backups
[...]
You'll get a bunch of modifiable variable names. Then you can use the update script to actually modify a var. For example the disk usage:
./reflect --type=update --class=vps --name=debianx.vm --subaction=limit --v-priv-disk_usage=2000
Dont forget the --v- tag.
If a reflect --type --subaction type command does not return anyting, there is a possibility that that command does not take arguments (like boot) or you misstyped something.
Of course, you dont have to use the reflect scrit, if you already know the subaction and arguments.
More examples:
Update timezone:
./reflect --type=update --class=vps --name=debianx.vm --subaction=timezone
timezone Timezone
./update --class=vps --name=debianx.vm --subaction=timezone --v-timezone=Europe/Budapest
Tells you the available limit variables:
./reflect --type=update --class=resourceplan --name=basic_x___client-admin --subaction=limit
Change resplan flag:
./update --class=resourceplan --name=proba___client-admin --subaction=limit --v-priv-vps_add_flag=off
I am sure that I havent solved all your problems and this is a rough road, but hopefully I helped 
Best wishes,
Semir
ProfiVPS.com Cheap VPS hosting! Buy it from me 
ProfiVPS.hu Megbízható, Olcsó VPS bérlés, Virtuális szerver bérlés
If I helped you, please consider putting my link on your site/blog! Thank you in advance
[Updated on: Tue, 21 June 2011 18:40] Report message to a moderator
|
|
|
|