Re: [ovirt-users] Question about the ovirt-engine-sdk-java

2015-10-20 Thread Michael Pasternak
Hi Salifou,
OK, i see now, then you have two options:
a) To extend the sdk:
1. extend java-sdk by allowing to inject custom headers in every request (not 
trivial as all ovirt SDKs are auto-generated,but if its common case, you may 
find yourself getting help from community/maintainers)
2. fork java-sdk customizing it for your needs
I'd recommend the former as fork will leave you with no support/maintenance 
from community plus you'll haveto implement new features by your own (what will 
become a moving target very quickly) 
b) Proxying the sdk
You can implement dynamic proxy wrapping SDK's HttpProxy.java#execute and 
intercept the context from there,but you've to stay tuned as backward 
compatibility is for interface and not for SDK internals,so "potentially" you 
can find your code broken in one of the following upgrades
hope it helps. 

 On Monday, October 19, 2015 6:05 PM, Salifou Sidi M. Malick 
 wrote:
   

 Hi Micheal,

Thanks for replying. Unfortunately the headers are dynamic ...

Here is the story:

We implemented a custom RHEV-M AAA module for a client
in order to allow their custom portal to make RHEV-M API 
calls. 

The custom AAA module requires extra dynamic data in the HTTP 
request (as request headers for now but request parameters 
should be fine too). 

Their is no problem if they go with the REST API, I am just 
trying to anticipate/identify potential integration problem ...

It seems like they will have to use the REST API or modify the 
java sdk ...  

Thanks a lot,
Salifou


- Original Message -
From: "Michael Pasternak" 
To: "Salifou Sidi M. Malick" 
Cc: "Users" 
Sent: Sunday, October 18, 2015 5:45:05 AM
Subject: Re: Question about the ovirt-engine-sdk-java

Hi Salifou,
Actually java sdk is intentionally hiding transport level internals so 
developers could stay in java domain,if your headers are static, easiest way 
would be using reverse proxy in a middle to intercept requests, 

can you tell me why do you need this?
 


    On Friday, October 16, 2015 1:14 AM, Salifou Sidi M. Malick 
 wrote:
  

 Hi Micheal,

I have a question about the ovirt-engine-sdk-java.

Is there a way to add custom request headers to each RHEVM API call?

Here is an example of a request that I would like to do:

$ curl -v -k \
          -H "ID: us...@ad.xyz.com" \
          -H "PASSWORD: Pwssd" \
          -H "TARGET: kobe" \
          https://vm0.smalick.com/api/hosts


I would like to add ID, PASSWORD and TARGET as HTTP request header. 

Thanks,
Salifou




  ___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Question about the ovirt-engine-sdk-java

2015-10-18 Thread Michael Pasternak
Hi Salifou,
Actually java sdk is intentionally hiding transport level internals so 
developers could stay in java domain,if your headers are static, easiest way 
would be using reverse proxy in a middle to intercept requests, 

can you tell me why do you need this?
 


 On Friday, October 16, 2015 1:14 AM, Salifou Sidi M. Malick 
 wrote:
   

 Hi Micheal,

I have a question about the ovirt-engine-sdk-java.

Is there a way to add custom request headers to each RHEVM API call?

Here is an example of a request that I would like to do:

$ curl -v -k \
          -H "ID: us...@ad.xyz.com" \
          -H "PASSWORD: Pwssd" \
          -H "TARGET: kobe" \
          https://vm0.smalick.com/api/hosts


I would like to add ID, PASSWORD and TARGET as HTTP request header. 

Thanks,
Salifou



  ___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] Autostart vm's at host boot on local storage

2014-12-23 Thread Michael Pasternak
Brent,
You can achieve that using oVirt "High Availability" [1], 
Also see "WatchDog" [2] (if you want your guests to bemonitored on the OS level 
for responsiveness).

[1] http://www.ovirt.org/OVirt_3.0_Feature_Guide#High_availability[2] 
http://www.ovirt.org/Features/Watchdog_engine_support
 

 On Tuesday, December 23, 2014 6:54 AM, Brent Hartzell 
 wrote:
   

  Can this be done? We hit a road block with gluster and will be using local 
storage while testing gluster. Only problem, if a host reboots, the vm's on 
that host do not. Is there a way to have ovirt/libvirt start all vm's residing 
on the local storage?
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


   ___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt-shell command to move a disk

2014-12-01 Thread Michael Pasternak
not sure what sdk version 3.4.4 is, but according to log, latest official for 
3.4 is 3.4.1.1-1(make you have it installed)
 

 On Monday, December 1, 2014 12:10 PM, Nicolas Ecarnot 
 wrote:
   

 Le 01/12/2014 11:07, Michael Pasternak a écrit :
> make sure you using latest sdk & cli, what is it btw? (run 'info' command)

[oVirt shell (connected)]# info

backend version: 3.4
sdk version    : 3.4.4
cli version    : 3.4.0.5
python version : 2.6.6.final.0

I think I run the version that is installed according to the global 
oVirt version ecosystem - quite the same packages versions around 3.4.4.

> [oVirt shell (connected)]# action disk serv-fs-int1_Disk1 move
> --storagedomain-name data-vm-adm8
>
> 
>
> UNKNOWN ERROR
> =
>                                                                get() got
> an unexpected keyword argument 'name'


-- 
Nicolas Ecarnot


   ___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt-shell command to move a disk

2014-12-01 Thread Michael Pasternak
make sure you using latest sdk & cli, what is it btw? (run 'info' command)

 

 On Sunday, November 30, 2014 7:48 PM, Nicolas Ecarnot 
 wrote:
   

 Le 30/11/2014 15:01, Michael Pasternak a écrit :
> Hi Nicolas,
>
> In oVit you can find /Disks under several locations
>
> /api/disks
> /api/vms/{vm:id}/disks
> /api/templates/{template:id}/disks
> /api/vms/{vm:id}/snapshots/{snapshot:id}/disks
>
> to move disk to a different domain, you have to use first one,
> e.g disk with no context [1], on ovirt-shell language it will look like [2].
>
> [1] /disks/{disk:id}/move
> [2] action disk {disk:id} move -- storagedomain-name|--storagedomain-id
> [--action-async true] ...
> (use help/auto-completion to see command details/verbs)

Hi Mickael,

Thank you for your reply, but here is what I get :

[oVirt shell (connected)]# action disk serv-fs-int1_Disk1 move 
--storagedomain-name data-vm-adm8
 
 
UNKNOWN ERROR 
=
                                                              get() got 
an unexpected keyword argument 'name'
 


I get the same when using the id instead of the names.

-- 
Nicolas Ecarnot


   ___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [ovirt-users] oVirt-shell command to move a disk

2014-11-30 Thread Michael Pasternak
Hi Nicolas,
In oVit you can find /Disks under several locations
/api/disks/api/vms/{vm:id}/disks/api/templates/{template:id}/disks/api/vms/{vm:id}/snapshots/{snapshot:id}/disks
to move disk to a different domain, you have to use first one,e.g disk with no 
context [1], on ovirt-shell language it will look like [2].

[1] /disks/{disk:id}/move[2] action disk {disk:id} move -- 
storagedomain-name|--storagedomain-id [--action-async true] ...(use 
help/auto-completion to see command details/verbs)
 

 On Saturday, November 29, 2014 12:56 AM, Nicolas Ecarnot 
 wrote:
   

 Hello,

I'm confused because though I'm using ovirt-shell to script many actions 
every day, and even after a large bunch of reading and testing, I can 
not find the correct syntax to move (offline/available) disks between 
storage domains.

May you help me please?

(oVirt 3.4.4)

-- 
Nicolas Ecarnot
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] python-sdk : how to modify a vm to "Run on" a "Specific" host and set "Migration Options

2013-12-28 Thread Michael Pasternak

Hi,

take a look at vm.start.__doc__ it should have all the answers you're looking 
for,
as about migrate options, these two [1] are responsible for pinning vm to 
specific host,
possible options for the 'affinity' can be seen at  [2].

[1]

[@param action.vm.placement_policy.host.id|name: string]
[@param action.vm.placement_policy.affinity: string]

[2]

http[s]://host[:port]/api/capabilities


On 12/27/2013 11:54 PM, karthik S wrote:
> Dear Users,
> 
> I am karthik, based in Mountain View, CA. I have been using python ovirtsdk 
> for QA Automation tests for RHEV-M for past two months. My knowledge on 
> ovirtsdk is intermittent
> at this stage.
> 
> I want to do the below actions that we do on rhev-M using python ovirtsdk.
> 
> On, RHEV-M UI
> 
> 1) right click a offline VM >> Edit >> Host >> "Run On:" >> Specific >. 
> choose a hostname
> 2) right click a offline VM >> Edit >> Host >>  "Migration Options:" >> "Do 
> not allow migration"
> 
> python Code:
> ==
> 
> 1) The VM was imported from export domain to my storage_domain using the code
> 
> 
> def import_vm(self, source_vm_name, dest_vm_name, storage_domain_name, 
> rhev_host_name=None, cluster_name="Default",  async=False):
> """
> Import VM From a Export domain into your storage domain
> """
> timeoutSec=1800
> pollInterval=2
> 
> exportStorageDomain = self.api.storagedomains.list(type_="export")[0]
> actionParams = params.Action(
>  
> storage_domain=self.api.storagedomains.get(storage_domain_name),
>  cluster=self.api.clusters.get("Default"),
>  clone=1,
>  vm = params.VM (name=dest_vm_name,
>  
> snapshots=params.Snapshots(collapse_snapshots=1),
>  disks = 
> params.Disks(clone = 1),
>  host = 
> params.Host(name=rhev_host_name)
> ))
> 
> exportStorageDomain.vms.get(source_vm_name).import_vm(actionParams)
> start = time.time()
> while self.api.vms.get(dest_vm_name).status.state != 'down':
> if time.time() - start > timeoutSec:
> raise Exception("Timed out (%s) waiting for %s to obtain 
> down status" % (timeoutSec, vm_name))
> time.sleep(pollInterval)
> 
> return self.api.vms.get(name=dest_vm_name)[0]
> 
> 
> Issue :  Upon import, this method did not set the "Run as" to the specified 
> host  but "Run as" was set to "Any host in the cluster".  Am I missing 
> something ?
> 
> 2) Secondly, I tried modifying the VM "Run as" hostname with the below code
> 
>>>> api = API (url = "xx" , username ="XX", pasword ="XX", ca_file = "ca")
>>>> vm_obj = api.vms.list(name="test_vm_101")[0]
>>>> vm_obj.set_host="rhev1"
>>>> vm_obj.update()
> 
> This did not help either. Seems I am missing something..
> 
> 
> 3) finally how to set " "Migration Options" ?
> 
> 
> Your help would appreciated and will help me to get greater understanding of 
> the SDK itself.
> 
> Thanks,
> Karthik
> 
> 
> 
> 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-java 3.4.0.1-1 released

2013-12-24 Thread Michael Pasternak

- to vms.add() added [action.vm.initialization.cloud-init]
- to NIC added OnBoot/BootProtocol properties
- to VersionCaps added a list of supported payload-encodings
- to Step added externalType
- to NIC added vnicProfile and bootProtocol
- to CPU added architecture
- to VnicProfilePermission added delete() method
- to Disk added readOnly
- to VMs.add() added [vm.cpu.architecture], 
[action.vm.initialization.cloud_init.*] arguments
- to Templates.add() added [template.cpu.architecture], 
[action.template.initialization.cloud_init.*] arguments
- to UserRoles.add() added permit.id|name arguments
- at VMSnapshot removed preview/undo/commit methods
- to DataCenterClusterGlusterVolumeGlusterBricks added 
activate/stopmigrate/migrate actions
- to NetworkVnicProfile added Permissions sub-collection
- to Cluster added [cluster.cpu.architecture]
- to DataCenter added Networks sub-collection
- to ClusterGlusterVolumeGlusterBricks added activate method
- to ClusterGlusterVolume added stoprebalance method
- to entry-point API added Permissions collection (for managing 
system-permissions)
- to host.install() added ssh related arguments
- to template added virtio_scsi.enabled
- to vm added virtio_scsi.enabled
- added ability to attach a disk snapshot to the virtual machine
- to File class added 'content' field
- Payload class now reuses Files instead of own PayloadFile collection

more details can be found at [1].

[1] http://www.ovirt.org/Java-sdk-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-python 3.4.0.1-1 released

2013-12-24 Thread Michael Pasternak

- to host.install() added ssh related details
- to template added virtio_scsi.enabled
- to vm added virtio_scsi.enabled
- to File class added 'content' field
- Payload class now reuses Files instead of own List of  objects
- added ability to attach a disk snapshot to the virtual machine
- to vms.add() added [action.vm.initialization.cloud-init]
- to NIC added OnBoot/BootProtocol properties
- to VersionCaps added a list of supported payload-encodings
- to Step added externalType
- to NIC added vnicProfile and bootProtocol
- to CPU added architecture
- to VnicProfilePermission added delete() method
- to Disk added readOnly
- to VMs.add() added [vm.cpu.architecture], 
[action.vm.initialization.cloud_init.*] arguments
- to Templates.add() added [template.cpu.architecture], 
[action.template.initialization.cloud_init.*] arguments
- to UserRoles.add() added permit.id|name arguments
- at VMSnapshot removed preview/undo/commit methods
- to DataCenterClusterGlusterVolumeGlusterBricks added 
activate/stopmigrate/migrate actions
- to NetworkVnicProfile added Permissions sub-collection
- to Cluster added [cluster.cpu.architecture]
- to DataCenter added Networks sub-collection
- to ClusterGlusterVolumeGlusterBricks added activate method
- to ClusterGlusterVolume added stoprebalance method
- to entry-point API added Permissions collection (for managing 
system-permissions)
- to host.install() added ssh related arguments
- to template added virtio_scsi.enabled
- to vm added virtio_scsi.enabled
- added ability to attach a disk snapshot to the virtual machine
- to File class added 'content' field
- Payload class now reuses Files instead of own PayloadFile collection
- to Cluster added [cluster.display.proxy]
- to VmPool added [vmpool.display.proxy]
- sdk ignores url attribute and hardcode /api #1038952
- support automatic auth session invalidation #1018559


more details can be found at [1].

[1] http://www.ovirt.org/Python-sdk-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Python SDK list vms slow, excessive cpu usage

2013-12-17 Thread Michael Pasternak

Hi Sander,

This is a known issue caused by generateDS python bindings we use,
it's extremely slow in python<->xml marshalling, and unable to recognize
cyclic referencing in the objects,

i'm planning to upgrade in 3.4 from 2.9a to 2.12, if it won't help, we may
consider other options.

On 12/17/2013 04:04 PM, Sander Grendelman wrote:
> Fetching the list of vms through the API with the python SDK
> takes several seconds[1] with 100% cpu usage in the python script.
> 
> When I look at the engine log there is only one (fast) fetch from
> the API. The rest of the time is spent in the SDK processing a
> relatively small bit of XML data (only 26 VMs in my environment).
> 
> This seems an excessive amount of CPU for processing ~6KB of XML.
> 
> I've included some sample code [2] and output [3].
> Attached is the cProfile output for this call and a visualization.
> 
> [1] ~6,5 seconds on an oVirt VM with 1 vcpu on older hardware,
> ~3,5 seconds on a fast physical machine with an i5 cpu.
> 
> [2] Sample code, add your own url/credentials/certificate:
> 
> #!/usr/bin/python
> """Get ovirt VM names"""
> 
> import time
> 
> from ovirtsdk.api import API
> from ovirtsdk.xml import params
> 
> def print_elapsed(logString):
> elapsed = time.time() - startTime
> print "%fs %s" % (elapsed, logString)
> 
> startTime = time.time()
> 
> print_elapsed("before connect")
> api = API(
> url="https://my.engine.url/api";,
> username="user@domain",
> password="password",
> ca_file="./ca.crt",
> )
> print_elapsed("after connect")
> 
> print_elapsed("before fetch list")
> vmList = api.vms.list()
> print_elapsed("after fetch list")
> 
> print_elapsed("before use list")
> count = 0
> for vm in vmList:
>   vmName = vm.get_name()
>   count += 1
> 
> print "\t number of VMs %d" % count
> 
> [3] Example of output:
> 
> [grendelmans@bungee src]$ /usr/bin/time ./vm_list_test.py
> 0.03s before connect
> 0.338248s after connect
> 0.338299s before fetch list
> 6.795967s after fetch list
> 6.796041s before use list
>  number of VMs 26
> 6.796181s after use list
> 7.28user 0.05system 0:07.64elapsed 96%CPU (0avgtext+0avgdata 
> 84624maxresident)k
> 0inputs+0outputs (0major+5605minor)pagefaults 0swaps
> [grendelmans@bungee src]$
> 
> 
> 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] oVirt Cloud-Init integration REST-API

2013-12-06 Thread Michael Pasternak

Michal?

On 12/06/2013 12:25 PM, Sven Kieske wrote:
> Hi,
> 
> we want to utilize Cloud-Init via REST-API, like mentioned on
> the feature page in the wiki:
> http://www.ovirt.org/Features/Cloud-Init_Integration
> 
> but looking at api?rsdl I do not find any clue
> if this is implemented already in 3.3.1?
> 
> if yes, how to call this function?
> 
> if no, can we hack something in the db to activate it
> or at least use the function to automatic build the
> cd-roms which get passed to the vms?
> 
> I really need this feature.
> 
> Thanks for your help.
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] crafting a POST request to the oVirt API manually

2013-12-04 Thread Michael Pasternak


Hi,

On 12/04/2013 10:16 AM, Itamar Heim wrote:
> 
> [Users] crafting a POST request to the oVirt API manually.eml
> 
> Subject:
> [Users] crafting a POST request to the oVirt API manually
> From:
> i iordanov 
> Date:
> 12/03/2013 11:50 PM
> 
> To:
> "users@ovirt.org" 
> 
> 
> Hello,
> 
> Can somebody give me some pointers on how to craft POST requests to the API 
> "by hand" with (for example) a Firefox plugin like Poster:
> 
> https://addons.mozilla.org/en-US/firefox/addon/poster/
> 
> It would be very helpful for libgovirt development.

this [1] should give you a clue on how to use http methods, and this [2]
what content to be send and what is available in general at api.

[1] http://www.ovirt.org/REST-Api#oVirt-API_How-to_.28the_methods.29
[2] on your environment run:
2.1 GET http[2]://myserver[:port]/api?rsdl (RESTful service description 
language)
2.2 GET http[2]://myserver[:port]/api?schema (xsd schema we used to model 
our api)

hope it helps.

> 
> Thanks!
> iordan
> 
> -- 
> The conscious mind has only one thread of execution.
> 
> 
> _______
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Fwd: oVirt 3.3.1 REST-API: UML for all Objects?

2013-12-03 Thread Michael Pasternak

Hey Sven,

Sorry for the late reply, RSDL is your tool indeed, btw please note that you
can see entire xsd schema we use to model api, just do GET on /api?schema, (it 
is also referenced from RSDL),

hope it helps.

On 12/03/2013 12:52 PM, Oved Ourfalli wrote:
> Perhaps using the RSDL (RESTful service description language) can give you a 
> clue about the different object types, and their fields. Also, it provides 
> information about the different actions you can do, mandatory fields for 
> these actions, and etc.
> Just go to the API URL, followed by "?rsdl" 
> (http://localhost:8700/ovirt-engine/api?rsdl)
> 
> As a rule we try to make everything available at the UI level also available 
> at API level. Not sure what the current gaps are (if any).
> 
> Oved
> 
> - Original Message -
>> From: "Sven Kieske" 
>> To: users@ovirt.org
>> Sent: Tuesday, December 3, 2013 12:33:43 PM
>> Subject: [Users] Fwd: oVirt 3.3.1 REST-API: UML for all Objects?
>>
>> Hi,
>>
>> as I didn't get any reply until today from the REST-API
>> Maintainer, maybe someone on the users list knows where
>> such a list of all objects can be obtained?
>>
>> See below for detailed information.
>>
>> Thank you!
>>
>>
>>  Original-Nachricht 
>> Betreff: oVirt 3.3.1 REST-API: UML for all Objects?
>> Datum: Fri, 29 Nov 2013 11:07:22 +0100
>> Von: Sven Kieske 
>> An: mpast...@redhat.com
>>
>> Hi,
>>
>> you are listed as the REST-API Maintainer, so I write to you and hope
>> you can help me.
>>
>> We need a description (preferred as UML, but we take anything we can get
>> ) about all Objects which are provided through the Rest-API.
>>
>> We know we can call via REST-API, but it seems not all objects are
>> reported back, e.g. if the object is not set.
>>
>> Example: Via GUI, you can set a description for each VM-Disk, but this
>> does not get reported if I call this disk via REST-API.
>>
>> In the RHEV-API-Guide (Developers Guide) 3.2 there is no such list
>> and browsing via gitweb was also not successful(maybe we looked in the
>> wrong place?).
>>
>> Is there such a list or UML for all accessible REST-API-Objects for
>> oVirt 3.3.1?
>>
>> Or are the objects which can't be seen via REST-API not implemented
>> in the REST-API and are therefore just accessible over GUI?
>>
>>
>> Thanks for your help!
>>
>> --
>> Mit freundlichen Grüßen / Regards
>>
>> Sven Kieske
>>
>> Systemadministrator
>> Mittwald CM Service GmbH & Co. KG
>> Königsberger Straße 6
>> 32339 Espelkamp
>> T: +49-5772-293-100
>> F: +49-5772-293-333
>> https://www.mittwald.de
>> Geschäftsführer: Robert Meyer
>> St.Nr.: 331/5721/1033, USt-IdNr.: DE814773217, HRA 6640, AG Bad Oeynhausen
>> Komplementärin: Robert Meyer Verwaltungs GmbH, HRB 13260, AG Bad Oeynhausen
>>
>> ___
>> Users mailing list
>> Users@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] ssl error using ovirt-shell in 3.3.1

2013-11-26 Thread Michael Pasternak
On 11/26/2013 11:18 PM, Gianluca Cecchi wrote:
> On Tue, Nov 26, 2013 at 6:29 PM, Gianluca Cecchi wrote:
>> On Tue, Nov 26, 2013 at 4:06 PM, Michael Pasternak  wrote:
>>> On 11/26/2013 04:09 PM, Gianluca Cecchi wrote:
>>>> Hello,
>>>> based on RHEVM 3.2 and 3.3 beta docs I'm trying connection from ovirt cli.
>>>> I have:
>>>> engine on f19 + ovirt stable ovirt-engine-3.3.1-2.fc19.noarch
>>>> client from where I run cli is f19 with
>>>> ovirt-engine-sdk-python-3.3.0.7-1.fc19.noarch
>>>> ovirt-engine-cli-3.3.0.5-1.fc19.noarch
> 
> Uhm, strange.
> From another client that is f19 too and incidentally contains an oVirt
> AIO configuration and so has enabled the ovirt stable repo I have
> ovirt-engine-sdk-python-3.3.0.8-1.fc19.noarch
> ovirt-engine-cli-3.3.0.6-1.fc19.noarch
> 
> and I'm perfectly able to connect with the same steps as the not working one.
> 
> $ wget -O f18engine.crt http://10.4.4.60:/ca.crt
> --2013-11-26 22:03:41--  http://10.4.4.60/ca.crt
> Connecting to 10.4.4.60:80... connected.
> HTTP request sent, awaiting response... 200 OK
> Length: 1376 (1.3K) [application/x-x509-ca-cert]
> Saving to: ‘f18engine.crt’
> 
> 100%[>]
> 1,376   --.-K/s   in 0.001s
> 
> 2013-11-26 22:03:42 (1.41 MB/s) - ‘f18engine.crt’ saved [1376/1376]
> 
> [g.cecchi@tekkaman ~]$ ovirt-shell -c -l https://10.4.4.60:443/api -A
> f18engine.crt -u "admin@internal"

you probably have clean ~/.ovirtshellrc here without assigned one of the 
client's certificates.

> Password:
> 
> 
>  ==
>  >>> connected to oVirt manager 3.3.0.0 <<<
>  ==
> 
> 
> 
>  ++
> 
>Welcome to oVirt shell
> 
>  ++
> 
> 
> [oVirt shell (connected)]# exit
> 
> while on the not working standard f19 client (see above) I have
> ovirt-engine-sdk-python-3.3.0.7-1.fc19.noarch
> ovirt-engine-cli-3.3.0.5-1.fc19.noarch
> as provided by upstream f19 (dated 10/10 in updates...)
> Could it be this one the reason?
> Anyone able to verify on standard f19 without ovirt repo against a
> 3.3.1 install?
> 
> 
> Thanks,
> Gianluca
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] ssl error using ovirt-shell in 3.3.1

2013-11-26 Thread Michael Pasternak
On 11/26/2013 07:29 PM, Gianluca Cecchi wrote:
> On Tue, Nov 26, 2013 at 4:06 PM, Michael Pasternak  wrote:
>> On 11/26/2013 04:09 PM, Gianluca Cecchi wrote:
>>> Hello,
>>> based on RHEVM 3.2 and 3.3 beta docs I'm trying connection from ovirt cli.
>>> I have:
>>> engine on f19 + ovirt stable ovirt-engine-3.3.1-2.fc19.noarch
>>> client from where I run cli is f19 with
>>> ovirt-engine-sdk-python-3.3.0.7-1.fc19.noarch
>>> ovirt-engine-cli-3.3.0.5-1.fc19.noarch
> 
>> this is client side certificate key, you should be using "ca_file" for the 
>> host CA.
> 
> Reading these documents:
> 
> https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.3-Beta/html/Command_Line_Shell_Guide/Attaining_an_SSL_certificate_from_RHEVM_for_a_REST_API_Client.html
> 
> http://www.ovirt.org/CLI
> 
> http://www.ovirt.org/How_to_Connect_to_SPICE_Console_Without_Portal
> 
> It is not clear to me the correct combination/requirements on client
> side to be able to connect

ovirt-shell -h
==

  -K KEY_FILE, --key-file=KEY_FILE
specify client PEM key-file
  -C CERT_FILE, --cert-file=CERT_FILE
specify client PEM cert-file
  -A CA_FILE, --ca-file=CA_FILE
specify server CA cert-file

[oVirt shell (disconnected)]# help connect
=

   
   * [key-file]- The client PEM key file to use.
   * [cert-file]   - The client PEM certificate file to use.
   * [ca-file] - The server CA certificate file to use.
   ...

http://www.ovirt.org/CLI#Connect
===

has very same description of certificates

- so as you see doesn't matter what option you choose, it has clear
distinction between client and server certificates,

and obviously if you have CA certificate (called ca.crt)
you should be using options called: "--cert-file", "-A 
CA_FILE/--ca-file=CA_FILE"

> 
> Suppose I keep empty (aka default values) the .ovirtshellrc file:
> 
> [cli]
> autoconnect = True
> autopage = True
> [ovirt-shell]
> username =
> timeout = None
> extended_prompt = False
> url =
> insecure = False
> filter = False
> session_timeout = None
> ca_file =
> dont_validate_cert_chain = False
> key_file = None
> password =
> cert_file =
> 
> And put all needed options into command line. The steps I understand I
> have to do are
> 
> 1) curl -o ca.crt http://f18engine/ca.crt
> (that should be "server CA cert-file", correct?)
> 
> 2) connect
> But with
> ovirt-shell -c -A ./ca.crt -l https://10.4.4.60:443/api -u admin@internal
> 
> I get
> error: _ssl.c:291: Both the key & certificate files must be specified

this is happens cause you have specified one of the client validation 
certificates
and as error states, both --key-file + --cert-file should be supplied for 
client validation.

> 
> that I don't find any reference for in the docs...
> Probably it is my fault with poor certificates/CA knowledge, but I
> presume it should be simpler for a user that only wants to interface
> to oVirt CLI have a correct sequence of steps
> 
> Also, from http://www.ovirt.org/CLI#Usage (referred in
> /usr/share/doc/ovirt-engine-cli-3.3.0.5/README)
> 
> ovirt-shell --help should give the help
> 
> but this seems not to be true:

please read again the docs, they all have clear documentation
where CA and where client side validation certificates.

> 
>  $ ovirt-shell --help
> URL:
> 
> Gianluca
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] ssl error using ovirt-shell in 3.3.1

2013-11-26 Thread Michael Pasternak
On 11/26/2013 04:09 PM, Gianluca Cecchi wrote:
> Hello,
> based on RHEVM 3.2 and 3.3 beta docs I'm trying connection from ovirt cli.
> I have:
> engine on f19 + ovirt stable ovirt-engine-3.3.1-2.fc19.noarch
> client from where I run cli is f19 with
> ovirt-engine-sdk-python-3.3.0.7-1.fc19.noarch
> ovirt-engine-cli-3.3.0.5-1.fc19.noarch
> 
> $ curl -o ovirt-f18engine.cer http://f18engine/ca.crt
> 
> $ cat ~/.ovirtshellrc
> [cli]
> autoconnect = True
> autopage = True
> [ovirt-shell]
> username = "internal\\admin"
> timeout = None
> extended_prompt = False
> url = https://f18engine:443/api
> insecure = False
> filter = False
> session_timeout = None
> ca_file =
> dont_validate_cert_chain = False
> key_file = None
> password =
> cert_file = /home/gcecchi/ovirt-f18engine.cer

this is client side certificate key, you should be using "ca_file" for the host 
CA.

> 
> cert_file seems not to work because I get
> 
> $ ovirt-shell -c
> Password:
> 
> error: server CA certificate file must be specified for SSL secured 
> connection.
> 
> I presume referring to
> https://bugzilla.redhat.com/show_bug.cgi?id=960983
> still in verified state
> 
> $ ovirt-shell -c -A /home/gcecchi/ovirt-f18engine.cer
> Password:
> 
> error: [Errno 336265225] _ssl.c:351: error:140B0009:SSL
> routines:SSL_CTX_use_PrivateKey_file:PEM lib
> 
> 
> 
> 
>  ++
> 
>Welcome to oVirt shell
> 
>  ++
> 
> 
> [oVirt shell (disconnected)]# exit
> 
> 
> If I change .ovirtshellrc contents with
> cert_file =
> 
> and run
> $ ovirt-shell -c -A /home/gcecchi/ovirt-f18engine.cer
> Password:
> 
> I get
> error: _ssl.c:291: Both the key & certificate files must be specified
> 
> What I'm doing wrong?
> 
> Gianluca
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] About Create VM by REST api

2013-11-20 Thread Michael Pasternak
On 11/20/2013 01:36 PM, zoeran wrote:
> Hi all
> I'm using rhevm which is derived from ovirt ;
> I want to create vms through REST Apis ,& got stuck in.:-(
> How can I create a vm from a template and specifiy a new storagedomain to 
> hold the new vm's disk(clone the template's to new storagedomain);
> 
> I can do this operation through the web interface,I'v consulted the rhev 
> Developer Guide,and get nothing;
> 
> do you have any ideas :-)

take a look on RSDL [1].

[1] http://server:port/api?rsdl

> 
> 
> 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-cli 3.4.0.2 released

2013-11-14 Thread Michael Pasternak

- added missing package descriptors in setup.py (required for easy_install 
deployment)

More details can be found at [1].

[1] http://wiki.ovirt.org/Cli-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-cli 3.4.0.1 released

2013-11-14 Thread Michael Pasternak

- implement CLI invocation capabilities #895559
- expose api capabilities in cli #891227
- add the option to retrieve partial history #957499
- construct object using factory on update #950684
- added new state - UNAUTHORIZED
- implement StateMachine
- implement event driven messaging
- implement visualization effects
- history length was limited to 3000 records
- raise CommandError on generic errors
- implicitly disconnect on exit
- ovirt-shell does not exit when using -f option #854519
- eliminate ambiguity by adding suffix -identifier to parent's options #1027281
- do not ask for credentials at /help in auto-connect mode #1026798
- list xxx --show all - output is not well formatted #890038

More details can be found at [1].

[1] http://wiki.ovirt.org/Cli-changelog
-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-java 1.0.0.19-1 released

2013-10-30 Thread Michael Pasternak

 - to host.install() added ssh related arguments
 - to template added virtio_scsi.enabled
 - to vm added virtio_scsi.enabled
 - added ability to attach a disk snapshot to the virtual machine
 - to File class added 'content' field
 - Payload class now reuses Files instead of own PayloadFile collection

more details can be found at [1].

[1] http://www.ovirt.org/Java-sdk-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-python 3.3.0.8-1 released

2013-10-30 Thread Michael Pasternak

 - to host.install() added ssh related arguments
 - to template added virtio_scsi.enabled
 - to vm added virtio_scsi.enabled
 - added ability to attach a disk snapshot to the virtual machine
 - to File class added 'content' field
 - Payload class now reuses Files instead of own PayloadFile collection

more details can be found at [1].

[1] http://www.ovirt.org/Python-sdk-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-cli 3.3.0.5-1 released

2013-10-09 Thread Michael Pasternak


More details can be found at [1].

[1] http://wiki.ovirt.org/Cli-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-python 3.3.07-1 released

2013-10-09 Thread Michael Pasternak

For more details see [1].

* note for pypi users: 3.3 sdk was renamed to ovirt-engine-sdk-python and hosted
at [2], old repository [3] contains 3.2 artifacts only.

[1] http://wiki.ovirt.org/Python-sdk-changelog
[2] https://pypi.python.org/pypi/ovirt-engine-sdk-python
[3] https://pypi.python.org/pypi/ovirt-engine-sdk

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-java 1.0.0.18-1 released

2013-10-09 Thread Michael Pasternak

More details can be found at [1].


[1] http://www.ovirt.org/Java-sdk-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] How can I make a VM "immortal"?

2013-09-24 Thread Michael Pasternak

Actually this is a bug [1].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1005562

On 09/24/2013 09:53 AM, lof yer wrote:
> That's fine, I thought there was an option in api that make the start as 
> normal one.
> 
> 2013/9/24 Itamar Heim mailto:ih...@redhat.com>>
> 
> On 09/24/2013 06:34 AM, lof yer wrote:
> 
> Ok, that's easy to accomplish.
> But when I use restapi to start a VM, why does the log show me that it
> runs in RUNONCE mode rather than NORMAL START?
> 
> 
> since the api allows you to pass any parameter to affect the run.
> does it matter?
> 
> 
> 
> 2013/9/24 lofyer mailto:lof...@gmail.com> 
> <mailto:lof...@gmail.com <mailto:lof...@gmail.com>>>
> 
> 
> On 2013/9/24 6:03, Itamar Heim wrote:
> 
> On 09/23/2013 06:18 PM, lofyer wrote:
> 
> Besides assigning a watchdog device to it, are there any
> other ways to
> make the VM autostart even if an user shutdown it 
> manually?
> ___
> Users mailing list
> Users@ovirt.org <mailto:Users@ovirt.org> 
> <mailto:Users@ovirt.org <mailto:Users@ovirt.org>>
> http://lists.ovirt.org/mailman/listinfo/users 
> <http://lists.ovirt.org/__mailman/listinfo/users>
> 
> <http://lists.ovirt.org/__mailman/listinfo/users 
> <http://lists.ovirt.org/mailman/listinfo/users>>
> 
> 
> if a user shut down a vm from inside or via engine?
>     i suggest an external script on engine monitoring its status 
> and
> starting it for such a use case
> 
> You mean a anacrontab script?
> 
> 
> 
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Multiple network interfaces on engine?

2013-09-23 Thread Michael Pasternak

is it possible that you have all-in-one installed and have both the engine
and host on a same machine?

On 09/23/2013 04:05 PM, Itamar Heim wrote:
> On 09/23/2013 02:41 PM, Rickard Kristiansson wrote:
>> OK. Maybe I'm asking for something irrelevant, but to answer René's
>> question; The use case is that there are two separate physical networks
>> for general IP and storage IP, and Engine seems to require to be able to
>> reach the NFS server to validate the connection when configuring
>> mapping. So to be able to configure a NFS server, the Engine needs to be
>> connected also to the storage network.
> 
> engine does not need to be connected to storage network. it does all storage 
> access via the hosts.
> 
>> It worked fine after manually tweaking the sysconfig/network-scripts,
>> but this config was then shortly overridden by Engine discovering and
>> trying to use the second NIC for bonding with ovirtmgmt.
> 
> the engine isn't trying to bond by itself. have you bonded the interfaces on 
> the host setup-network dialog?
> 
>>
>> 
>> *Från: *"Michael Pasternak" 
>> *Till: *"Rickard Kristiansson" ,
>> users@ovirt.org, "Oved Ourfalli" 
>> *Kopia: *"Ohad Levy" 
>> *Skickat: *måndag, 23 sep 2013 13:35:40
>> *Ämne: *Re: [Users] Multiple network interfaces on engine?
>>
>> On 09/23/2013 02:23 PM, Rickard Kristiansson wrote:
>>  > Hmm.. yes, I do have the storage network configured in DC and
>> Cluster, and also attached to all my hypervisors.
>>  > The question is just how I also attach it to the Engine server, as
>> this isn't visible as a node in the GUI?
>>
>> i think this could be done with puppet, afaik some work for integrating
>> it to
>> oVirt been done lately, though not sure if it's already available,
>>
>> oved?
>>
>>  >
>>  >
>>  >
>> 
>>  > *Från: *"Michael Pasternak" 
>>  > *Till: *"Rickard Kristiansson" 
>>  > *Kopia: *users@ovirt.org, "\"René \"Koch (ovido)\"\"" 
>>  > *Skickat: *måndag, 23 sep 2013 13:20:06
>>  > *Ämne: *Re: [Users] Multiple network interfaces on engine?
>>  >
>>  > On 09/23/2013 01:50 PM, Rickard Kristiansson wrote:
>>  >> Thanks Michael,
>>  >>
>>  >> I'm still trying to get my head around this, but I can't see how I
>> configure the networks on the engine?
>>  >> For nodes and AOI it's OK, but in my case I am running the engine as
>> a separate server which is not a node and does not show up as a Host in
>> the GUI.
>>  >> Or do I need to add the engine as a host in the GUI as well, to be
>> able to configure it?
>>  >
>>  > IIUC your question, you have various options:
>>  >
>>  > 1. GUI
>>  > 2. SDKs
>>  > 3. CLI
>>  >
>>  > you need to create network in DC, attach it to cluster, attach to
>> host NIC/s (if you want it to be
>>  > atomic operation, i.e you expect connectivity loss during the
>> operation/s, setupnetworks should be used,
>>  > otherwise you can use attach-network dialogues in UI)
>>  >
>>  >>
>>  >>
>>  >>
>> 
>>  >> *Från: *"Michael Pasternak" 
>>  >> *Till: *"Rickard Kristiansson" 
>>  >> *Kopia: *users@ovirt.org
>>  >> *Skickat: *måndag, 23 sep 2013 12:21:40
>>  >> *Ämne: *Re: [Users] Multiple network interfaces on engine?
>>  >>
>>  >> On 09/23/2013 12:54 PM, Rickard Kristiansson wrote:
>>  >>> Hi,
>>  >>>
>>  >>> I want to use two network interfaces connected to different
>> networks in Engine (3.3), where one is for ovirtmgmt and one is for a
>> separate storage network.
>>  >>> It works fine for a minute or so after rebooting Engine, but then
>> the configuration is changed by Engine, connecting both interfaces to
>> bond0 and losing connectivity (as
>>  >>> obviously you can't bond those two interfaces when they are
>> connected to separate physical netwo

Re: [Users] Multiple network interfaces on engine?

2013-09-23 Thread Michael Pasternak
On 09/23/2013 02:23 PM, Rickard Kristiansson wrote:
> Hmm.. yes, I do have the storage network configured in DC and Cluster, and 
> also attached to all my hypervisors.
> The question is just how I also attach it to the Engine server, as this isn't 
> visible as a node in the GUI?

i think this could be done with puppet, afaik some work for integrating it to
oVirt been done lately, though not sure if it's already available,

oved?

> 
> 
> --------
> *Från: *"Michael Pasternak" 
> *Till: *"Rickard Kristiansson" 
> *Kopia: *users@ovirt.org, "\"René \"Koch (ovido)\"\"" 
> *Skickat: *måndag, 23 sep 2013 13:20:06
> *Ämne: *Re: [Users] Multiple network interfaces on engine?
> 
> On 09/23/2013 01:50 PM, Rickard Kristiansson wrote:
>> Thanks Michael,
>>
>> I'm still trying to get my head around this, but I can't see how I configure 
>> the networks on the engine?
>> For nodes and AOI it's OK, but in my case I am running the engine as a 
>> separate server which is not a node and does not show up as a Host in the 
>> GUI.
>> Or do I need to add the engine as a host in the GUI as well, to be able to 
>> configure it?
> 
> IIUC your question, you have various options:
> 
> 1. GUI
> 2. SDKs
> 3. CLI
> 
> you need to create network in DC, attach it to cluster, attach to host NIC/s 
> (if you want it to be
> atomic operation, i.e you expect connectivity loss during the operation/s, 
> setupnetworks should be used,
> otherwise you can use attach-network dialogues in UI)
> 
>>
>>
>> 
>> *Från: *"Michael Pasternak" 
>> *Till: *"Rickard Kristiansson" 
>> *Kopia: *users@ovirt.org
>> *Skickat: *måndag, 23 sep 2013 12:21:40
>> *Ämne: *Re: [Users] Multiple network interfaces on engine?
>>
>> On 09/23/2013 12:54 PM, Rickard Kristiansson wrote:
>>> Hi,
>>>
>>> I want to use two network interfaces connected to different networks in 
>>> Engine (3.3), where one is for ovirtmgmt and one is for a separate storage 
>>> network.
>>> It works fine for a minute or so after rebooting Engine, but then the 
>>> configuration is changed by Engine, connecting both interfaces to bond0 and 
>>> losing connectivity (as
>>> obviously you can't bond those two interfaces when they are connected to 
>>> separate physical networks..).
>>> What is the mechanism doing this,
>>
>> please see this [1].
>>
>> [1] http://www.ovirt.org/Features/Design/Network/SetupNetworks
>>
>>> and it is possible to disable this automatic network bonding on the engine 
>>> so that we can use separate networks on the network interfaces..?
>>
>> attaching logs would help, but i guess it happen cause you did not saved
>> your host network config, i.e when host got rebooted, it performs roll-back
>> to old config, this is actually disaster recovery mechanism.
>>
>>>
>>> Rickard
>>>
>>> **
>>>
>>>
>>> ___
>>> Users mailing list
>>> Users@ovirt.org
>>> http://lists.ovirt.org/mailman/listinfo/users
>>>
>>
>>
>> --
>>
>> Michael Pasternak
>> RedHat, ENG-Virtualization R&D
>>
> 
> 
> -- 
> 
> Michael Pasternak
> RedHat, ENG-Virtualization R&D
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Multiple network interfaces on engine?

2013-09-23 Thread Michael Pasternak
On 09/23/2013 02:24 PM, René Koch (ovido) wrote:
> 
> On Mon, 2013-09-23 at 14:14 +0300, Michael Pasternak wrote:
>> On 09/23/2013 01:53 PM, René Koch (ovido) wrote:
>>>
>>> On Mon, 2013-09-23 at 12:50 +0200, Rickard Kristiansson wrote:
>>>> Thanks Michael,
>>>>
>>>>
>>>>
>>>> I'm still trying to get my head around this, but I can't see how I
>>>> configure the networks on the engine?
>>>> For nodes and AOI it's OK, but in my case I am running the engine as a
>>>> separate server which is not a node and does not show up as a Host in
>>>> the GUI.
>>>
>>>
>>> Does your engine really need access to the storage?
>>> ovirtmgmt network should be sufficient in most cases.
>>>
>>> You can configure the network of engine using your favorite editor and
>>> edit/create /etc/sysconfig/network-scripts/ifcfg-* files...
>>
>> I'd avoid doing this, changing network config behind the engine's back is
>> not supported and may cause re-config on reboot on which Rickard
>> originally complained.
> 
> I totally agree that configuring the network directly on the hosts
> should be avoided.
> 
> I think I misunderstood the issue of Rickard - I thought he has issues
> configuring network for the engine itself. 

i'm afraid that i'm the one who misunderstood his question :)

> But (after reading your last email with your suggestions) the question
> is how to define logical networks in engine and deploy config on hosts
> (if this is the case please don't do any configuration manually with an
> editor.)
> 
> 
>>
>>>
>>>
>>> Regards,
>>> René
>>>
>>>>
>>>> Or do I need to add the engine as a host in the GUI as well, to be
>>>> able to configure it?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> __
>>>> Från: "Michael Pasternak" 
>>>> Till: "Rickard Kristiansson" 
>>>> Kopia: users@ovirt.org
>>>> Skickat: måndag, 23 sep 2013 12:21:40
>>>> Ämne: Re: [Users] Multiple network interfaces on engine?
>>>>
>>>>
>>>> On 09/23/2013 12:54 PM, Rickard Kristiansson wrote:
>>>>> Hi,
>>>>>
>>>>> I want to use two network interfaces connected to different networks
>>>> in Engine (3.3), where one is for ovirtmgmt and one is for a separate
>>>> storage network.
>>>>> It works fine for a minute or so after rebooting Engine, but then
>>>> the configuration is changed by Engine, connecting both interfaces to
>>>> bond0 and losing connectivity (as
>>>>> obviously you can't bond those two interfaces when they are
>>>> connected to separate physical networks..).
>>>>> What is the mechanism doing this, 
>>>>
>>>>
>>>> please see this [1].
>>>>
>>>>
>>>> [1] http://www.ovirt.org/Features/Design/Network/SetupNetworks
>>>>
>>>>
>>>>> and it is possible to disable this automatic network bonding on the
>>>> engine so that we can use separate networks on the network
>>>> interfaces..?
>>>>
>>>>
>>>> attaching logs would help, but i guess it happen cause you did not
>>>> saved
>>>> your host network config, i.e when host got rebooted, it performs
>>>> roll-back
>>>> to old config, this is actually disaster recovery mechanism.
>>>>
>>>>
>>>>>
>>>>> Rickard
>>>>>
>>>>> **
>>>>>
>>>>>
>>>>> ___
>>>>> Users mailing list
>>>>> Users@ovirt.org
>>>>> http://lists.ovirt.org/mailman/listinfo/users
>>>>>
>>>>
>>>>
>>>>
>>>> -- 
>>>>
>>>>
>>>> Michael Pasternak
>>>> RedHat, ENG-Virtualization R&D
>>>>
>>>>
>>>>
>>>> ___
>>>> Users mailing list
>>>> Users@ovirt.org
>>>> http://lists.ovirt.org/mailman/listinfo/users
>>>
>>
>>
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Multiple network interfaces on engine?

2013-09-23 Thread Michael Pasternak
On 09/23/2013 01:50 PM, Rickard Kristiansson wrote:
> Thanks Michael,
> 
> I'm still trying to get my head around this, but I can't see how I configure 
> the networks on the engine?
> For nodes and AOI it's OK, but in my case I am running the engine as a 
> separate server which is not a node and does not show up as a Host in the GUI.
> Or do I need to add the engine as a host in the GUI as well, to be able to 
> configure it?

IIUC your question, you have various options:

1. GUI
2. SDKs
3. CLI

you need to create network in DC, attach it to cluster, attach to host NIC/s 
(if you want it to be
atomic operation, i.e you expect connectivity loss during the operation/s, 
setupnetworks should be used,
otherwise you can use attach-network dialogues in UI)

> 
> 
> --------
> *Från: *"Michael Pasternak" 
> *Till: *"Rickard Kristiansson" 
> *Kopia: *users@ovirt.org
> *Skickat: *måndag, 23 sep 2013 12:21:40
> *Ämne: *Re: [Users] Multiple network interfaces on engine?
> 
> On 09/23/2013 12:54 PM, Rickard Kristiansson wrote:
>> Hi,
>>
>> I want to use two network interfaces connected to different networks in 
>> Engine (3.3), where one is for ovirtmgmt and one is for a separate storage 
>> network.
>> It works fine for a minute or so after rebooting Engine, but then the 
>> configuration is changed by Engine, connecting both interfaces to bond0 and 
>> losing connectivity (as
>> obviously you can't bond those two interfaces when they are connected to 
>> separate physical networks..).
>> What is the mechanism doing this,
> 
> please see this [1].
> 
> [1] http://www.ovirt.org/Features/Design/Network/SetupNetworks
> 
>> and it is possible to disable this automatic network bonding on the engine 
>> so that we can use separate networks on the network interfaces..?
> 
> attaching logs would help, but i guess it happen cause you did not saved
> your host network config, i.e when host got rebooted, it performs roll-back
> to old config, this is actually disaster recovery mechanism.
> 
>>
>> Rickard
>>
>> **
>>
>>
>> ___
>> Users mailing list
>> Users@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
> 
> 
> -- 
> 
> Michael Pasternak
> RedHat, ENG-Virtualization R&D
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Multiple network interfaces on engine?

2013-09-23 Thread Michael Pasternak
On 09/23/2013 01:53 PM, René Koch (ovido) wrote:
> 
> On Mon, 2013-09-23 at 12:50 +0200, Rickard Kristiansson wrote:
>> Thanks Michael,
>>
>>
>>
>> I'm still trying to get my head around this, but I can't see how I
>> configure the networks on the engine?
>> For nodes and AOI it's OK, but in my case I am running the engine as a
>> separate server which is not a node and does not show up as a Host in
>> the GUI.
> 
> 
> Does your engine really need access to the storage?
> ovirtmgmt network should be sufficient in most cases.
> 
> You can configure the network of engine using your favorite editor and
> edit/create /etc/sysconfig/network-scripts/ifcfg-* files...

I'd avoid doing this, changing network config behind the engine's back is
not supported and may cause re-config on reboot on which Rickard
originally complained.

> 
> 
> Regards,
> René
> 
>>
>> Or do I need to add the engine as a host in the GUI as well, to be
>> able to configure it?
>>
>>
>>
>>
>>
>>
>> __
>> Från: "Michael Pasternak" 
>> Till: "Rickard Kristiansson" 
>> Kopia: users@ovirt.org
>> Skickat: måndag, 23 sep 2013 12:21:40
>> Ämne: Re: [Users] Multiple network interfaces on engine?
>>
>>
>> On 09/23/2013 12:54 PM, Rickard Kristiansson wrote:
>>> Hi,
>>>
>>> I want to use two network interfaces connected to different networks
>> in Engine (3.3), where one is for ovirtmgmt and one is for a separate
>> storage network.
>>> It works fine for a minute or so after rebooting Engine, but then
>> the configuration is changed by Engine, connecting both interfaces to
>> bond0 and losing connectivity (as
>>> obviously you can't bond those two interfaces when they are
>> connected to separate physical networks..).
>>> What is the mechanism doing this, 
>>
>>
>> please see this [1].
>>
>>
>> [1] http://www.ovirt.org/Features/Design/Network/SetupNetworks
>>
>>
>>> and it is possible to disable this automatic network bonding on the
>> engine so that we can use separate networks on the network
>> interfaces..?
>>
>>
>> attaching logs would help, but i guess it happen cause you did not
>> saved
>> your host network config, i.e when host got rebooted, it performs
>> roll-back
>> to old config, this is actually disaster recovery mechanism.
>>
>>
>>>
>>> Rickard
>>>
>>> **
>>>
>>>
>>> ___
>>> Users mailing list
>>> Users@ovirt.org
>>> http://lists.ovirt.org/mailman/listinfo/users
>>>
>>
>>
>>
>> -- 
>>
>>
>> Michael Pasternak
>> RedHat, ENG-Virtualization R&D
>>
>>
>>
>> ___
>> Users mailing list
>> Users@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Multiple network interfaces on engine?

2013-09-23 Thread Michael Pasternak
On 09/23/2013 12:54 PM, Rickard Kristiansson wrote:
> Hi,
> 
> I want to use two network interfaces connected to different networks in 
> Engine (3.3), where one is for ovirtmgmt and one is for a separate storage 
> network.
> It works fine for a minute or so after rebooting Engine, but then the 
> configuration is changed by Engine, connecting both interfaces to bond0 and 
> losing connectivity (as
> obviously you can't bond those two interfaces when they are connected to 
> separate physical networks..).
> What is the mechanism doing this, 

please see this [1].

[1] http://www.ovirt.org/Features/Design/Network/SetupNetworks

> and it is possible to disable this automatic network bonding on the engine so 
> that we can use separate networks on the network interfaces..?

attaching logs would help, but i guess it happen cause you did not saved
your host network config, i.e when host got rebooted, it performs roll-back
to old config, this is actually disaster recovery mechanism.

> 
> Rickard
> 
> **
> 
> 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] cant add storage connection via api

2013-09-23 Thread Michael Pasternak
On 09/23/2013 11:22 AM, Yuriy Demchenko wrote:
> On 09/23/2013 12:13 PM, Alissa Bonas wrote:
>>
>> - Original Message -
>>> From: "Yuriy Demchenko" 
>>> To: "Alissa Bonas" 
>>> Cc: "Ofer Schreiber" , users@ovirt.org, "Michael 
>>> Pasternak" , "Allon
>>> Mureinik" 
>>> Sent: Monday, September 23, 2013 10:57:12 AM
>>> Subject: Re: [Users] cant add storage connection via api
>>>
>>> On 09/23/2013 11:43 AM, Alissa Bonas wrote:
>>>> - Original Message -
>>>>> From: "Michael Pasternak" 
>>>>> To: "Yuriy Demchenko" , "Alissa Bonas"
>>>>> , "Alon Bar-Lev"
>>>>> 
>>>>> Cc: "Ofer Schreiber" , users@ovirt.org
>>>>> Sent: Monday, September 23, 2013 10:22:49 AM
>>>>> Subject: Re: [Users] cant add storage connection via api
>>>>>
>>>>> On 09/23/2013 10:05 AM, Yuriy Demchenko wrote:
>>>>>> Hi,
>>>>>>
>>>>>> url [1] (https://ovirt.spb.stone.local/api?rsdl) not working for me -
>>>>>> gets
>>>>>> http 500 error with "java.lang.NullPointerException"
>>>>>>> java.lang.NullPointerException
>>>>>>>
>>>>>>> org.ovirt.engine.api.restapi.resource.BackendApiResource.addSystemVersion(BackendApiResource.java:358)
>>>>>>>
>>>>>>> org.ovirt.engine.api.restapi.resource.BackendApiResource.get(BackendApiResource.java:316)
>>>>>>>   sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>>
>>>>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>>>>
>>>>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>>   java.lang.reflect.Method.invoke(Method.java:606)
>>>>>>>
>>>>>>> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)
>>>>>>>
>>>>>>> org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
>>>>>>>
>>>>>>> org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
>>>>>>>
>>>>>>> org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
>>>>>>>
>>>>>>> org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
>>>>>>>
>>>>>>> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
>>>>>>>
>>>>>>> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
>>>>>>>
>>>>>>> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
>>>>>>>
>>>>>>> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
>>>>>>>
>>>>>>> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
>>>>>>>   javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
>>>>>> api page (without "?rsdl") opens just fine.
>>>>> this is known issue caused by branding infra, i believe it was fixed in
>>>>> the
>>>>> following release (Alon correct me if i'm wrong)
>>>>>
>>>>>> Feature "manage storage connections" was mentioned in oVirt-3.3 release
>>>>>> notes (http://www.ovirt.org/OVirt_3.3_release_notes), under "storage"
>>>>>> section.
>>>>> alissa?
>>>> Storage connections management should be part of 3.3.
>>>> Yuriy, when did you install the 3.3 and which exact build did you take?
>>> That was upgrade from 3.2.2 to 3.3, did that on Tuesday 17, from 3.3
>>> release repo (http://resources.ovirt.org/releases/3.3/rpm/EL/6/)
>>>
>>> ovirt-engine-3.3.0-4.el6 noarch 9/17/13 3:05:40 PM MUT
>>> ovirt-engine-backend-3.3.0-4.el6 noarch 9/17/13 3:05:34 PM MUT
>>> ovirt-engine-cli-3.2.0.12-1.el6 noarch 6/17/13 11:24:48 AM MUT
&

Re: [Users] cant add storage connection via api

2013-09-23 Thread Michael Pasternak
On 09/23/2013 10:58 AM, Alon Bar-Lev wrote:
> 
> - Original Message -
>> > From: "Michael Pasternak" 
>> > To: "Yuriy Demchenko" , "Alissa Bonas" 
>> > , "Alon Bar-Lev"
>> > 
>> > Cc: "Ofer Schreiber" , users@ovirt.org
>> > Sent: Monday, September 23, 2013 10:22:49 AM
>> > Subject: Re: [Users] cant add storage connection via api
>> > 
>> > On 09/23/2013 10:05 AM, Yuriy Demchenko wrote:
>>> > > Hi,
>>> > > 
>>> > > url [1] (https://ovirt.spb.stone.local/api?rsdl) not working for me - 
>>> > > gets
>>> > > http 500 error with "java.lang.NullPointerException"
>>>> > >> java.lang.NullPointerException
>>>> > >>  
>>>> > >> org.ovirt.engine.api.restapi.resource.BackendApiResource.addSystemVersion(BackendApiResource.java:358)
>>>> > >>  
>>>> > >> org.ovirt.engine.api.restapi.resource.BackendApiResource.get(BackendApiResource.java:316)
>>>> > >> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> > >>  
>>>> > >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>> > >>  
>>>> > >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>> > >> java.lang.reflect.Method.invoke(Method.java:606)
>>>> > >>  
>>>> > >> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)
>>>> > >>  
>>>> > >> org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
>>>> > >>  
>>>> > >> org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
>>>> > >>  
>>>> > >> org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
>>>> > >>  
>>>> > >> org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
>>>> > >>  
>>>> > >> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
>>>> > >>  
>>>> > >> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
>>>> > >>  
>>>> > >> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
>>>> > >>  
>>>> > >> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
>>>> > >>  
>>>> > >> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
>>>> > >> javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
>>> > > 
>>> > > api page (without "?rsdl") opens just fine.

Yuriy,


does your database upgrade succeeded? did you say any errors?
-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] cant add storage connection via api

2013-09-23 Thread Michael Pasternak
On 09/23/2013 10:58 AM, Alon Bar-Lev wrote:
> 
> - Original Message -
>> > From: "Michael Pasternak" 
>> > To: "Yuriy Demchenko" , "Alissa Bonas" 
>> > , "Alon Bar-Lev"
>> > 
>> > Cc: "Ofer Schreiber" , users@ovirt.org
>> > Sent: Monday, September 23, 2013 10:22:49 AM
>> > Subject: Re: [Users] cant add storage connection via api
>> > 
>> > On 09/23/2013 10:05 AM, Yuriy Demchenko wrote:
>>> > > Hi,
>>> > > 
>>> > > url [1] (https://ovirt.spb.stone.local/api?rsdl) not working for me - 
>>> > > gets
>>> > > http 500 error with "java.lang.NullPointerException"
>>>> > >> java.lang.NullPointerException
>>>> > >>  
>>>> > >> org.ovirt.engine.api.restapi.resource.BackendApiResource.addSystemVersion(BackendApiResource.java:358)
>>>> > >>  
>>>> > >> org.ovirt.engine.api.restapi.resource.BackendApiResource.get(BackendApiResource.java:316)
>>>> > >> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>> > >>  
>>>> > >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>> > >>  
>>>> > >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>> > >> java.lang.reflect.Method.invoke(Method.java:606)
>>>> > >>  
>>>> > >> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)
>>>> > >>  
>>>> > >> org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
>>>> > >>  
>>>> > >> org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
>>>> > >>  
>>>> > >> org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
>>>> > >>  
>>>> > >> org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
>>>> > >>  
>>>> > >> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
>>>> > >>  
>>>> > >> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
>>>> > >>  
>>>> > >> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
>>>> > >>  
>>>> > >> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
>>>> > >>  
>>>> > >> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
>>>> > >> javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
>>> > > 
>>> > > api page (without "?rsdl") opens just fine.
>> > 
>> > this is known issue caused by branding infra, i believe it was fixed in the
>> > following release (Alon correct me if i'm wrong)
> Hi,
> 
> I don't see branding in trace...
> 
> Also not in code...
> 
> private RSDL addSystemVersion(RSDL rsdl) {
> 
> rsdl.setVersion(VersionHelper.parseVersion(getConfigurationValueDefault(String.class,
>  ConfigurationValues.VdcVersion)));
> return rsdl;
> }
> 
> As I do not know this code well, can you please explain some more why it is 
> relates to branding so I can solve?
> 
> Working for me as far as I can see... (master).
> 
> Thanks!
> 
> 

damn, my bad, confused with another issue with same symptom, please ignore me.

thanks.

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] cant add storage connection via api

2013-09-23 Thread Michael Pasternak
On 09/23/2013 10:43 AM, Alissa Bonas wrote:
> 
> 
> - Original Message -
>> From: "Michael Pasternak" 
>> To: "Yuriy Demchenko" , "Alissa Bonas" 
>> , "Alon Bar-Lev"
>> 
>> Cc: "Ofer Schreiber" , users@ovirt.org
>> Sent: Monday, September 23, 2013 10:22:49 AM
>> Subject: Re: [Users] cant add storage connection via api
>>
>> On 09/23/2013 10:05 AM, Yuriy Demchenko wrote:
>>> Hi,
>>>
>>> url [1] (https://ovirt.spb.stone.local/api?rsdl) not working for me - gets
>>> http 500 error with "java.lang.NullPointerException"
>>>> java.lang.NullPointerException
>>>>  
>>>> org.ovirt.engine.api.restapi.resource.BackendApiResource.addSystemVersion(BackendApiResource.java:358)
>>>>  
>>>> org.ovirt.engine.api.restapi.resource.BackendApiResource.get(BackendApiResource.java:316)
>>>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>  
>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>>>  
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>> java.lang.reflect.Method.invoke(Method.java:606)
>>>>  
>>>> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)
>>>>  
>>>> org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
>>>>  org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
>>>>  org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
>>>>  
>>>> org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
>>>>  
>>>> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
>>>>  
>>>> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
>>>>  
>>>> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
>>>>  
>>>> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
>>>>  
>>>> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
>>>> javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
>>>
>>> api page (without "?rsdl") opens just fine.
>>
>> this is known issue caused by branding infra, i believe it was fixed in the
>> following release (Alon correct me if i'm wrong)
>>
>>>
>>> Feature "manage storage connections" was mentioned in oVirt-3.3 release
>>> notes (http://www.ovirt.org/OVirt_3.3_release_notes), under "storage"
>>> section.
>>
>> alissa?
> 
> Storage connections management should be part of 3.3.
> Yuriy, when did you install the 3.3 and which exact build did you take?
> Also, can you access the following url (just a regular GET request) ?
> https://ovirt.spb.stone.local/api/storageconnections

according to the original api exception trace, api has storage_connections,
but not storage_connection, so i guess it's some nightly build of 3.3 ...

> 
>>>
>>> Yuriy Demchenko
>>>
>>> On 09/22/2013 11:00 AM, Michael Pasternak wrote:
>>>> Hi Yuriy,
>>>>
>>>> please see the correct way of adding new storageconnection at [1], under
>>>>  section,
>>>>
>>>> also please let us know if you find any inconsistency between the wiki
>>>> and rsdl,
>>>>
>>>> regarding the UnmarshalException, i'm not sure this feature got in to the
>>>> version you're using,
>>>>
>>>> Ofer, in what release mentioned feature is available?
>>>>
>>>> thanks.
>>>>
>>>> [1] https://ovirt.spb.stone.local/api?rsdl
>>>>
>>>> On 09/18/2013 03:21 PM, Yuriy Demchenko wrote:
>>>>> Hi,
>>>>>
>>>>> I've recently upgraded my test lab to ovirt-3.3 (el6) and trying to add
>>>>> additional target for iscsi domain.
>>>>> As described here -
>>>>> http://www.ovirt.org/Features/Manage_Storage_Connections , I'm trying
>>>>> first to add new connection via restapi, but operation fails with error
>>>>> "HTTP
>>>>> Status 400 - javax.xml.bind.UnmarshalException: unex

Re: [Users] cant add storage connection via api

2013-09-23 Thread Michael Pasternak
On 09/23/2013 10:05 AM, Yuriy Demchenko wrote:
> Hi,
> 
> url [1] (https://ovirt.spb.stone.local/api?rsdl) not working for me - gets 
> http 500 error with "java.lang.NullPointerException"
>> java.lang.NullPointerException
>>  
>> org.ovirt.engine.api.restapi.resource.BackendApiResource.addSystemVersion(BackendApiResource.java:358)
>>  
>> org.ovirt.engine.api.restapi.resource.BackendApiResource.get(BackendApiResource.java:316)
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>  
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
>>  
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> java.lang.reflect.Method.invoke(Method.java:606)
>>  
>> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)
>>  
>> org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
>>  org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
>>  org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
>>  
>> org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
>>  
>> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:502)
>>  
>> org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:119)
>>  
>> org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:208)
>>  
>> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
>>  
>> org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
> 
> api page (without "?rsdl") opens just fine.

this is known issue caused by branding infra, i believe it was fixed in the
following release (Alon correct me if i'm wrong)

> 
> Feature "manage storage connections" was mentioned in oVirt-3.3 release notes 
> (http://www.ovirt.org/OVirt_3.3_release_notes), under "storage" section.

alissa?

> 
> Yuriy Demchenko
> 
> On 09/22/2013 11:00 AM, Michael Pasternak wrote:
>> Hi Yuriy,
>>
>> please see the correct way of adding new storageconnection at [1], under
>>  section,
>>
>> also please let us know if you find any inconsistency between the wiki
>> and rsdl,
>>
>> regarding the UnmarshalException, i'm not sure this feature got in to the
>> version you're using,
>>
>> Ofer, in what release mentioned feature is available?
>>
>> thanks.
>>
>> [1] https://ovirt.spb.stone.local/api?rsdl
>>
>> On 09/18/2013 03:21 PM, Yuriy Demchenko wrote:
>>> Hi,
>>>
>>> I've recently upgraded my test lab to ovirt-3.3 (el6) and trying to add 
>>> additional target for iscsi domain.
>>> As described here - 
>>> http://www.ovirt.org/Features/Manage_Storage_Connections , I'm trying first 
>>> to add new connection via restapi, but operation fails with error "HTTP
>>> Status 400 - javax.xml.bind.UnmarshalException: unexpected element (uri:"", 
>>> local:"storage_connection")"
>>> I'm not very familiar with restapi and maybe doing something wrong, so 
>>> please help me to figure it out.
>>>
>>> here's what i put and reply from server:
>>>> curl -k -v -u "admin@internal:pass" -H "Content-type: application/xml" -d 
>>>> '
>>>> iscsi
>>>> 192.168.221.5
>>>> 3260
>>>> iqn.2013-09.local.stone.spb:target3.disk
>>>> ' 
>>>> 'https://ovirt.spb.stone.local/api/storageconnections'
>>>> * About to connect() to ovirt.spb.stone.local port 443 (#0)
>>>> *   Trying 192.168.220.13...
>>>> * connected
>>>> * Connected to ovirt.spb.stone.local (192.168.220.13) port 443 (#0)
>>>> * Initializing NSS with certpath: sql:/etc/pki/nssdb
>>>> * warning: ignoring value of ssl.verifyhost
>>>> * skipping SSL peer certificate verification
>>>> * SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
>>>> * Server certificate:
>>>> * subject: CN=ovirt.spb.stone.local,O=spb.stone.local,C=US
>>>> * start date: Aug 28 09:28:45 2013 GMT
>>>> * expire date: Aug 03 09:28:47 2018 GMT
>>>> * common name: ovirt.spb.stone.local
>>>> * is

Re: [Users] Fwd: Disk statistics

2013-09-22 Thread Michael Pasternak
Hi Joop,

> 
> [Users] Disk statistics.eml
> 
> Subject:
> [Users] Disk statistics
> From:
> Joop 
> Date:
> 09/20/2013 05:04 PM
> 
> To:
> "users@ovirt.org" 
> 
> 
> Hi All,
> 
> Because of an question on IRC I looked at /api/disks/long-disk-id/statistics 
> but all values (datum) are ZERO. Its a disk of a VM that was running a dd 
> if=/dev/vda
> of=/dev/null so I would expect something to show up (Did various webpage 
> refreshes of the mentioned stats url). I also have ovirt-guest-agent running 
> on that VM, in case it
> matters and the disk is on a NFS data domain.
> 
> What am I missing?

how was you trying to see the statistics? via sdk? api directly?,
can you please do the same at vm [1] context,

[1] /api/vms/{vm:id}/disks/{disk:id}/statistics

thanks.

> 
> Regards,
> 
> Joop
> 
> _______
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] cant add storage connection via api

2013-09-21 Thread Michael Pasternak
job>,<{}jobs>,<{}keyValuePair>,<{}ksm>,<{}link>,<{}linkCapabilities>,<{}logical_unit>,<{}mac>,<{}memory_pool>,<{}memory_pools>,<{}network>,<{}network_states!
 &g
> 
> t;,<{}networks>,<{}nfs_versions>,<{}nic>,<{}nic_interfaces>,<{}nics>,<{}options>,<{}os_types>,<{}parameter>,<{}parameters_set>,<{}payload>,<{}payload_file>,<{}payloads>,<{}permission>,<{}permissions>,<{}permit>,<{}permits>,<{}pm_proxies>,<{}pm_proxy>,<{}pm_proxy_types>,<{}port_mirroring>,<{}power_management>,<{}power_management_states>,<{}power_managers>,<{}preview_vms>,<{}product_info>,<{}quota>,<{}quotas>,<{}reported_device>,<{}reported_device_types>,<{}reported_devices>,<{}request>,<{}response>,<{}role>,<{}roles>,<{}rsdl>,<{}scheduling_policies>,<{}schema>,<{}server_hook>,<{}server_hooks>,<{}sgio_options>,<{}slaves>,<{}snapshot>,<{}snapshots>,<{}special_objects>,<{}ssh>,<{}stages>,<{}statistic>!
 ;,
> 
> <{}statistics>,<{}status>,<{}step>,<{}step_types>,<{}steps>,<{}storage>,<{}storage_connections>,<{}storage_domain>,<{}storage_domain_states>,<{}storage_domain_types>,<{}storage_domains>,<{}storage_formats>,<{}storage_manager>,<{}storage_types>,<{}summary>,<{}system_version>,<{}tag>,<{}tags>,<{}template>,<{}template_states>,<{}templates>,<{}transparent_hugepages>,<{}transport_types>,<{}url>,<{}usages>,<{}usb>,<{}user>,<{}users>,<{}value>,<{}values>,<{}vcpu_pin>,<{}version>,<{}vlan>,<{}vm>,<{}vm_affinities>,<{}vm_device_types>,<{}vm_pause_details>,<{}vm_states>,<{}vm_types>,<{}vmpool>,<{}vmpools>,<{}vms>,<{}volume_group>,<{}watchdog>,<{}watchdog_actions>,<{}watchdog_models>,<{}watchdogs>!
  
>>description
>> The request sent by the client was syntactically incorrect 
>> (javax.xml.bind.UnmarshalException: unexpected element (uri:"",
>> local:"storage_connection"). Expected elements are
>> <{}action>,<{}agent>,<{}agents>,<{}api>,<{}application>,<{}applications>,<{}authentication_methods>,<{}body>,<{}bonding>,<{}boot_devices>,<{}boot_protocols>,<{}brick>,<{}brick_details>,<{}brick_memoryinfo>,<{}brick_states>,<{}bricks>,<{}capabilities>,<{}cdrom>,<{}cdroms>,<{}certificate>,<{}cluster>,<{}clusters>,<{}console>,<{}content_types>,<{}cpu>,<{}cpu_modes>,<{}cpu_tune>,<{}cpus>,<{}creation>,<{}creation_states>,<{}custom_properties>,<{}data_center>,<{}data_center_states>,<{}data_centers>,<{}detailedLink>,<{}detailedLinks>,<{}disk>,<{}disk_formats>,<{}disk_interfaces>,<{}disk_states>,<{}disks>,<{}display>,<{}display_types>,<{}domain>,<{}domains>,<{}error_handling>,<{}event>,<{}events>,!
 &l
>>
> t;{}fault>,<{}feature>,<{}features>,<{}fence_types>,<{}file>,<{}files>,<{}floppies>,<{}floppy>,<{}general_metadata>,<{}gluster_client>,<{}gluster_clients>,<{}gluster_hook>,<{}gluster_volume>,<{}gluster_volume_states>,<{}gluster_volume_types>,<{}gluster_volumes>,<{}glusterhooks>,<{}group>,<{}groups>,<{}hardware_information>,<{}header>,<{}headers>,<{}hook>,<{}hook_states>,<{}hooks>,<{}host>,<{}host_nic>,<{}host_nic_states>,<{}host_nics>,<{}host_non_operational_details>,<{}host_states>,<{}host_storage>,<{}hosts>,<{}ip>,<{}ip_versions>,<{}ips>,<{}job>,<{}jobs>,<{}keyValuePair>,<{}ksm>,<{}link>,<{}linkCapabilities>,<{}logical_unit>,<{}mac>,<{}memory_pool>,<{}memory_pools>,<{}network>,<{}network_states!
 &g
> 
> t;,<{}networks>,<{}nfs_versions>,<{}nic>,<{}nic_interfaces>,<{}nics>,<{}options>,<{}os_types>,<{}parameter>,<{}parameters_set>,<{}payload>,<{}payload_file>,<{}payloads>,<{}permission>,<{}permissions>,<{}permit>,<{}permits>,<{}pm_proxies>,<{}pm_proxy>,<{}pm_proxy_types>,<{}port_mirroring>,<{}power_management>,<{}power_management_states>,<{}power_managers>,<{}preview_vms>,<{}product_info>,<{}quota>,<{}quotas>,<{}reported_device>,<{}reported_device_types>,<{}reported_devices>,<{}request>,<{}response>,<{}role>,<{}roles>,<{}rsdl>,<{}scheduling_policies>,<{}schema>,<{}server_hook>,<{}server_hooks>,<{}sgio_options>,<{}slaves>,<{}snapshot>,<{}snapshots>,<{}special_objects>,<{}ssh>,<{}stages>,<{}statistic>!
 ;,
> 
> <{}statistics>,<{}status>,<{}step>,<{}step_types>,<{}steps>,<{}storage>,<{}storage_connections>,<{}sto*
>> Closing connection #0
>> rage_domain>,<{}storage_domain_states>,<{}storage_domain_types>,<{}storage_domains>,<{}storage_formats>,<{}storage_manager>,<{}storage_types>,<{}summary>,<{}system_version>,<{}tag>,<{}tags>,<{}template>,<{}template_states>,<{}templates>,<{}transparent_hugepages>,<{}transport_types>,<{}url>,<{}usages>,<{}usb>,<{}user>,<{}users>,<{}value>,<{}values>,<{}vcpu_pin>,<{}version>,<{}vlan>,<{}vm>,<{}vm_affinities>,<{}vm_device_types>,<{}vm_pause_details>,<{}vm_states>,<{}vm_types>,<{}vmpool>,<{}vmpools>,<{}vms>,<{}volume_group>,<{}watchdog>,<{}watchdog_actions>,<{}watchdog_models>,<{}watchdogs>).> size="1" noshade="noshade">JBoss Web/7.0.13.Final
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Error 500 with python sdk on3.3

2013-09-15 Thread Michael Pasternak
apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
> > [jbossweb-7.0.13.Final.jar:]
> > at
> > 
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:489)
> > [jbossweb-7.0.13.Final.jar:]
> > at
> > 
> org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
> > [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]
> > at
> > 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
> > [jbossweb-7.0.13.Final.jar:]
> > at
> > 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> > [jbossweb-7.0.13.Final.jar:]
> > at
> > org.jboss.web.rewrite.RewriteValve.invoke(RewriteValve.java:466)
> > [jbossweb-7.0.13.Final.jar:]
> > at
> > 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> > [jbossweb-7.0.13.Final.jar:]
> > at
> > 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
> > [jbossweb-7.0.13.Final.jar:]
> > at
> > org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:505)
> > [jbossweb-7.0.13.Final.jar:]
> > at
> > 
> org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:445)
> > [jbossweb-7.0.13.Final.jar:]
> > at
> > org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
> > [jbossweb-7.0.13.Final.jar:]
> > at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]
> > Caused by: java.lang.NullPointerException
> > at
> > 
> org.ovirt.engine.api.common.util.LinkHelper.getCollection(LinkHelper.java:523)
> > [interface-common-jaxrs.jar:]
> > at
> > 
> org.ovirt.engine.api.common.util.LinkHelper.getUriBuilder(LinkHelper.java:569)
> > [interface-common-jaxrs.jar:]
> > at
> > 
> org.ovirt.engine.api.restapi.resource.AbstractBackendResource.linkSubCollections(AbstractBackendResource.java:287)
> > [restapi-jaxrs.jar:]
> > at
> > 
> org.ovirt.engine.api.restapi.resource.AbstractBackendResource.addLinks(AbstractBackendResource.java:228)
> > [restapi-jaxrs.jar:]
> > at
> > 
> org.ovirt.engine.api.restapi.resource.AbstractBackendResource.addLinks(AbstractBackendResource.java:218)
> > [restapi-jaxrs.jar:]
> > at
> > 
> org.ovirt.engine.api.restapi.resource.BackendVmsResource.mapCollection(BackendVmsResource.java:407)
> > [restapi-jaxrs.jar:]
> > at
> > 
> org.ovirt.engine.api.restapi.resource.BackendVmsResource.list(BackendVmsResource.java:71)
> > [restapi-jaxrs.jar:]
> > at sun.reflect.GeneratedMethodAccessor297.invoke(Unknown Source)
> > [:1.7.0_25]
> > at
> > 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > [rt.jar:1.7.0_25]
> > at java.lang.reflect.Method.invoke(Method.java:606)
> > [rt.jar:1.7.0_25]
> > at
> > 
> org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:155)
> > [resteasy-jaxrs-2.3.2.Final.jar:]
> > at
> > 
> org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
> > [resteasy-jaxrs-2.3.2.Final.jar:]
> >
> >  at
> > 
> org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:257)
> > [resteasy-jaxrs-2.3.2.Final.jar:]
> > at
> > org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:222)
> > [resteasy-jaxrs-2.3.2.Final.jar:]
> > at
> > org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:211)
> > [resteasy-jaxrs-2.3.2.Final.jar:]
> > at
> > 
> org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:525)
> > [resteasy-jaxrs-2.3.2.Final.jar:]
> > ... 21 more
> >
> >
> >
> > Hervé Leclerc
> > CTO
> > Alter Way
> > 1, rue royale
> > 9 ème étage
> > 92210 St Cloud
> > +33 1 78152407
> > +33 6 83979598
> >
> > <http://www.alterway.fr/signatures/url/1>
> >
> >
> > ___
> > Users mailing list
> > Users@ovirt.org <mailto:Users@ovirt.org>
> > http://lists.ovirt.org/mailman/listinfo/users
> >
> 
> --
> Dave Neary - Community Action and Impact
> Open Source and Standards, Red Hat - http://community.redhat.com
> Ph: +33 9 50 71 55 62  / Cell: +33 6 
> 77 01 92 13 
> 
> 
> 
> 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-python 3.3.0.6-1 released

2013-09-11 Thread Michael Pasternak

For more details see [1],
(note: change-log for [2] describing changes that took place from the last 
release 3.3.0.3-1)

[1] http://wiki.ovirt.org/Python-sdk-changelog
[2] 3.3.0.5-1, 3.3.0.4-1

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-java 1.0.0.17-1 released

2013-09-11 Thread Michael Pasternak

More details can be found at [1],
(note: change-log for [2] describing changes that took place from the last 
release 1.0.0.11-1)

[1] http://www.ovirt.org/Java-sdk-changelog
[2] 1.0.0.16 -1, 1.0.0.15 -1, 1.0.0.14 -1, 1.0.0.13 -1

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Disable MOTD on shell login

2013-09-10 Thread Michael Pasternak

Hi Christian,

On 09/10/2013 06:18 PM, Christian Hernandez wrote:
> If I may interject
> 
> Disabling the MOTD makes it easier to script...let's say if I want to get a 
> list of VMs' snapshots and out them in a for loop...I would have to write the 
> output of the
> rhevm-shell to a file; parse that file (oh BTW there are ^[[H and ^[[2 in 
> that file...just to make things more interesteing); then run it through my 
> loop - and then pass
> that into rhevm-shell...repeating the process. 

you don't have to write entire output of the shell to the file,
all shell commands supports output redirection to file/linux utilities
such as grep/etc. [1],

also in "script mode" printed limited MOTD (without welcome message)
if it still doesn't work for you, please file RFE (though i'm not sure it will 
make to 3.3)

[1] list snapshots --vm-identifier aaa > snapshots.txt
for more details see http://www.ovirt.org/CLI#Scripting

> Also it doesn't help that rhevm-shell does a "clear" of the screen when it 
> runs (can I turn that off too?)

this is done for create "visual" isolation between bash and ovirt shells,
not sure i understand how it related to the told above, but if you find it
usable, i don't mind.

> 
> I would have to do that for every command.
> 
> I don't mind having an MOTD...just wished there was an option to turn it off
> 
> 
> In short: It makes it easier to script and automate tasks.
> 
> 
> Thank you,
> 
> Christian Hernandez
> 1225 Los Angeles Street
> Glendale, CA 91204
> Phone: 877-782-2737 ext. 4566
> Fax: 818-265-3152
> christi...@4over.com <mailto:christi...@4over.com> 
> <mailto:christi...@4over.com <mailto:christi...@4over.com>>
> www.4over.com <http://www.4over.com/> <http://www.4over.com 
> <http://www.4over.com/>>
> 
> 
> On Tue, Sep 10, 2013 at 8:04 AM, Michael Pasternak  <mailto:mpast...@redhat.com>> wrote:
> 
> 
> Hi Anand,
> 
> On 09/10/2013 09:33 AM, Anand Nande wrote:
> > Hi,
> >
> > Is it possible $subject?
> > If so - please share how.
> 
> currently there is no "user-friendly" way to disable it,
> can you elaborate please why do you need that?
> 
> >
> > I tried to find the file which rhevm-shell would open using:
> >
> > # rhevm-shell -c -d...(no luck)
> > # lsof | egrep -i 'rhev|shell'   ...(no luck)
> >
> > Regards
> > --Anand
> >
> 
> 
> --
> 
> Michael Pasternak
> RedHat, ENG-Virtualization R&D
> ___
> Users mailing list
> Users@ovirt.org <mailto:Users@ovirt.org>
> http://lists.ovirt.org/mailman/listinfo/users
> 
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] oVirt-sdk to fetch individual cpu stats

2013-09-10 Thread Michael Pasternak

On 09/10/2013 02:04 PM, Deepthi Dharwar wrote:
> Thanks a lot Micheal. Works like a charm :)
> 
> How does one know that you need to access first field in
> statistic.get_values().get_value()[0].datum.
> Are these documented any place ?

you can see this in api [1] there is a collection of values
represented by  place-hoder, you can find discussion
on statistics api modelling at the old rhevm-api [2] mailing list.


  
...
  


[1] GET http://server:[port]/api/hosts/xxx/statistics
[2] https://lists.fedorahosted.org/pipermail/rhevm-api/

> 
> Regards,
> Deepthi
> 
> On 09/08/2013 03:55 PM, Michael Pasternak wrote:
> 
> 
>>
>> Hi Deepthi,
>>
>> On 09/06/2013 01:12 PM, Deepthi Dharwar wrote:
>>> Hi,
>>>
>>> I was trying to get the cpu statistics of a host using the oVirt python
>>> sdk. But beyond a point I am unable to deference to the actual cpu stats
>>> field and the data.
>>>
>>> h_list = api.hosts.list()
>>> for h in h_list:
>>> y = h.statistics.list()
>>> for i in y:
>>> print i.get_values()
>>>
>>> O/P:
>>>
>>>  
>>>  
>>>  
>>>  
>>>  
>>>
>>> Can some one please let me know how I can get individual fields like
>>> cpu.current.system or cpu.current.idle stats from here.
>>
>> you can use sdk client side filtering on collections using
>> map based constraints [1], just note that you cannot use
>> same constrain (name) twice [2] as following entry will always
>> override the former one,
>>
>> to work this out, just use your private inline filtering [3] (it will have
>> same complexity as using sdk filtering)
>>
>> [1]
>>
>> for h in h_list:
>> statistics = h.statistics.list(**{
>> 'name':'cpu.current.system'
>> }
>> )
>> for statistic in statistics:
>> print "%s=%0.4f %s" % (
>> statistic.get_name(),
>> statistic.get_values().get_value()[0].datum,
>> statistics[0].get_unit()
>> )
>>
>> [2]
>>
>> statistics = h.statistics.list(**{
>> 'name':'cpu.current.system',
>> 'name':'cpu.current.idle'
>> }
>> )
>>
>>
>> [3]
>>
>> h_list = api.hosts.list()
>> stats_to_show = ['cpu.current.system', 'cpu.current.idle']
>> for h in h_list:
>> statistics = h.statistics.list()
>> for statistic in statistics:
>> if statistic.get_name() in stats_to_show:
>> print "%s=%0.4f %s" % (
>> statistic.get_name(),
>> 
>> statistic.get_values().get_value()[0].datum ,
>> statistics[0].get_unit()
>> )
>>
>>
>>
>> hope it helps.
>>
>>>
>>> Thanks!
>>> Deepthi
>>>
>>
>>
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Disable MOTD on shell login

2013-09-10 Thread Michael Pasternak

Hi Anand,

On 09/10/2013 09:33 AM, Anand Nande wrote:
> Hi,
> 
> Is it possible $subject?
> If so - please share how.

currently there is no "user-friendly" way to disable it,
can you elaborate please why do you need that?

> 
> I tried to find the file which rhevm-shell would open using:
> 
> # rhevm-shell -c -d...(no luck)
> # lsof | egrep -i 'rhev|shell'   ...(no luck)
> 
> Regards
> --Anand
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Small help regarding rhevm-shell scripting

2013-09-09 Thread Michael Pasternak

Hi Anand,

On 09/05/2013 12:07 PM, Anand Nande wrote:
> Hi Michael,
> 
> The plan is to have a automated backup solution which will daily backup the 
> Vms
> and stop-export-stop them automatically in RHEVM-3.2's rhevm-shell.
> 
> Having said that I am not sure : *How to use conditional statements like 
> if-else/for/while loops* *inside the**
> **script file* *which is passed with the '-f' or '--file' option to 
> 'rhevm-shell' ?*

Processing shell output is just like any text processing,

basically what you need is a simple bash script, that analyses the input
produced by something like [1] and invokes another script based on your
condition/s something like [2]:

[1]

list vms --show-all | grep -w 'name\|status' > list_vms
ovirt-shell -f list_vms


[2]

s1="..."
s2="..."

if [$s1 == $s2]
then
  # invoke relevant script passing relevant parameters
fi

* in future versions (maybe even at 3.4) i plan adding additional cli
capabilities to the shell,

like invoking single command and printing the output to stdio what
will make possible writing a single bash script that invokes different
shell commands, but till then you can achieve the same via dedicated
scripts like list_vms/suspend_vms/export_vms (in my view its even better
from the code maintenance PoV)

> 
> 
> If there is a way to do this, please let me know.
> I would like to use this to check if :
> - The VM is already present in the Export-Domain (?)
>+If yes, remove the VM present in the export-domain and re-initiate the 
> export op on the new VM.
>+else, Export the VM.
> - After the above is complete, Check if the Export op is complete:
>+If yes, Start the VM which is stopped.
>+else, wait for Export to complete and once done, start the VM.
> 
> 
> Having the above in a script, I can have the cron job scheduled to execute 
> the script.
> Waiting for your feedback.
> 
> Thanks
> $Anand
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] oVirt-sdk to fetch individual cpu stats

2013-09-08 Thread Michael Pasternak

Hi Deepthi,

On 09/06/2013 01:12 PM, Deepthi Dharwar wrote:
> Hi,
> 
> I was trying to get the cpu statistics of a host using the oVirt python
> sdk. But beyond a point I am unable to deference to the actual cpu stats
> field and the data.
> 
> h_list = api.hosts.list()
> for h in h_list:  
>   y = h.statistics.list()
>   for i in y:
>   print i.get_values()
> 
> O/P:
> 
>  
>  
>  
>  
>  
> 
> Can some one please let me know how I can get individual fields like
> cpu.current.system or cpu.current.idle stats from here.

you can use sdk client side filtering on collections using
map based constraints [1], just note that you cannot use
same constrain (name) twice [2] as following entry will always
override the former one,

to work this out, just use your private inline filtering [3] (it will have
same complexity as using sdk filtering)

[1]

for h in h_list:
statistics = h.statistics.list(**{
'name':'cpu.current.system'
}
)
for statistic in statistics:
print "%s=%0.4f %s" % (
statistic.get_name(),
statistic.get_values().get_value()[0].datum,
statistics[0].get_unit()
)

[2]

statistics = h.statistics.list(**{
'name':'cpu.current.system',
'name':'cpu.current.idle'
}
)


[3]

h_list = api.hosts.list()
stats_to_show = ['cpu.current.system', 'cpu.current.idle']
for h in h_list:
statistics = h.statistics.list()
for statistic in statistics:
if statistic.get_name() in stats_to_show:
print "%s=%0.4f %s" % (
statistic.get_name(),
statistic.get_values().get_value()[0].datum 
,
statistics[0].get_unit()
)



hope it helps.

> 
> Thanks!
> Deepthi
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Minor question concerning ServerException class

2013-09-08 Thread Michael Pasternak
Hi Ricky,

On 09/06/2013 09:31 PM, Hopper, Richard wrote:
> Hi Michael,
> 
> While working with the ovirt-engine-sdk-java, 
> I came across a small issue concerning the ServerException class. I wrote a 
> utility to handle different types of exceptions
> (ServerException being one of those) for our plugin and found that 
> ServerException does not meet GWT's specific serialization requirements due 
> to the lack of a no-arg
> constructor of any visibility level. Is there an explicit reason for the lack 
> of such a constructor? 

no, not at all, addressed at [1].

[1] http://gerrit.ovirt.org/#/c/18960/

thanks for reporting this.

> I was able to work around this, it's just a minor concern as far as GWT
> goes, and it could be useful to others if such types were serializable as 
> well.
> 
> Thanks,
> 
> - Ricky


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] oVirt 3.3 Release Go/No-Go Meeting Minutes

2013-09-03 Thread Michael Pasternak
python setup.py registerOn 09/03/2013 08:55 PM, Juan Hernandez wrote:
> On 09/03/2013 04:24 PM, Ofer Schreiber wrote:
>> Minutes:
>> http://ovirt.org/meetings/ovirt/2013/ovirt.2013-09-03-13.08.html
>> Minutes (text): 
>> http://ovirt.org/meetings/ovirt/2013/ovirt.2013-09-03-13.08.txt
>> Log:
>> http://ovirt.org/meetings/ovirt/2013/ovirt.2013-09-03-13.08.log.html
>>
>> ==
>> #ovirt: oVirt 3.3 Release go/no-go
>> ==
>>
>>
>> Meeting started by oschreib at 13:08:21 UTC. The full logs are available
>> at http://ovirt.org/meetings/ovirt/2013/ovirt.2013-09-03-13.08.log.html
>> .
>>
>> Meeting summary
>> ---
>> * Agenda and roll call  (oschreib, 13:08:37)
>>   * Open issues from last week  (oschreib, 13:08:52)
>>   * blocker review  (oschreib, 13:09:04)
>>   * release communication  (oschreib, 13:09:30)
>>
>> * open issues  (oschreib, 13:11:32)
>>   * ACTION: mburns to add the spice-html rpm to el6 build  (oschreib,
>> 13:15:54)
>>   * ACTION: mburns and oschreib to get new SDK build  (oschreib,
>> 13:18:03)
>>
>> * Release blockers  (oschreib, 13:18:17)
>>   * All-In-One is broken due to missing ovirt-engine-sdk-python build
>> (oschreib, 13:28:21)
>>   * el6 is broken due to missing spice-html build  (oschreib, 13:28:41)
>>   * new ovirt-engine-sdk-python is needed before we can release
>> (oschreib, 13:47:57)
>>   * ACTION: jhernand to test AIO once we have such build  (oschreib,
>> 13:48:10)
>>   * ACTION: oschreib to get a new build from mpastern asap  (oschreib,
>> 13:48:50)

latest RPMs repo was emailed to oschreib/mburns.

>>   * no other blockers from 3.3 tracker  (oschreib, 13:50:07)
>>
>> * decision  (oschreib, 13:50:20)
>>   * agreed to release tomorrow one AIO works  (oschreib, 13:57:49)
>>
>> * release communication  (oschreib, 13:58:06)
>>   * rebuild of engine and sdk today  (mburns, 14:06:36)
>>   * ACTION: oschreib to update mburns with location of new rpms
>> (mburns, 14:06:53)
>>   * new engine is rpm version change only (remove rc2)  (mburns,
>> 14:07:04)
>>   * ACTION: mburns to upload new sdk and engine to stable location
>> (mburns, 14:07:23)
>>   * ACTION: mburns to get everything prepped for 3.3 release on Monday
>> 9-Sep  (mburns, 14:07:35)
>>   * dneary and others to test AIO install today and next couple days
>> (mburns, 14:07:55)
>>   * release to go out on Monday  (mburns, 14:08:01)
>>   * ACTION: mburns to push release live on monday  (mburns, 14:08:12)
>>   * LINK: http://gerrit.ovirt.org/#/c/18762/ - we had pushed to 3.3
>> branch  (sahina, 14:11:10)
>>   * 1 bugfix included in engine build  (mburns, 14:12:49)
>>   * related to gluster-only mode installation of engine  (mburns,
>> 14:13:00)
>>
>> Meeting ended at 14:13:54 UTC.
>>
>> Action Items
>> 
>> * mburns to add the spice-html rpm to el6 build
>> * mburns and oschreib to get new SDK build
>> * jhernand to test AIO once we have such build
>> * oschreib to get a new build from mpastern asap
>> * oschreib to update mburns with location of new rpms
>> * mburns to upload new sdk and engine to stable location
>> * mburns to get everything prepped for 3.3 release on Monday 9-Sep
>> * mburns to push release live on monday
>>
>>
>> Action Items, by person
>> ---
>> * jhernand
>>   * jhernand to test AIO once we have such build
> 
> I can confirm that both versions 3.3.0.5 and 3.3.0.6 of
> ovirt-engine-sdk-python work correctly with the all in one plugin. I
> built them myself to verify this in Fedora 19 and CentOS. If I
> understood correctly mpastern is currently building the official
> packages and they should very soon be ready to upload to ovirt.org.
> 
>> * mburns
>>   * mburns to add the spice-html rpm to el6 build
>>   * mburns and oschreib to get new SDK build
>>   * oschreib to update mburns with location of new rpms
>>   * mburns to upload new sdk and engine to stable location
>>   * mburns to get everything prepped for 3.3 release on Monday 9-Sep
>>   * mburns to push release live on monday
>> * oschreib
>>   * mburns and oschreib to get new SDK build
>>   * oschreib to get a new build from mpastern asap
>>   * oschreib to update mburns with location of new rpms
>>
>>
>> People Present (lines said)
>> 

Re: [Users] oVirt REST API

2013-08-27 Thread Michael Pasternak
Hi James,

On 08/27/2013 06:45 PM, James Laska wrote:
> Greetings Michael,
> 
> Thanks for your guidance earlier today on IRC regarding accessing the
> oVirt REST API using json.  
> 
> Can you direct me to examples, or documentation, on how to pass
> arguments via the REST API?  I'm able to get basic queries working ...
> 
> https://somehost.example.com/api/vms?search=name=foo

you can use very same query you use in UI.

> 
> However, more exhaustive documentation/examples would be very helpful.

see  https://somehost.example.com/api?rsdl

> 
> Thanks,
> James
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-java 1.0.0.11-1 released

2013-07-16 Thread Michael Pasternak

* Tue  Jul 16 2013 Michael Pasternak  - 1.0.0.11-1
- added "watchdog" feature #947977
- added "external tasks" feature #872719
- snapshot can persist/restore memory state now #960931

More details can be found at [1].

[1] http://www.ovirt.org/Java-sdk-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-cli 3.3.0.3-1 released

2013-07-16 Thread Michael Pasternak

* Tue Jul  16 2013 Michael Pasternak  - 3.3.0.3-1
- refactor "connect" command help
- remove support for --password option #983713
- add option to define auto connect #918908
- "exit" command fails after "disconnect" from script #971285
- list permits format better error when not enough parameters #962472
- ovirt-shell should contain the hostname of the system #866319
- certificate file keys are not exposed in .ovirtshellrc #960983
- add brick operation fails from ovirt-shell #923169


More details can be found at [1].

[1] http://wiki.ovirt.org/Cli-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-python 3.3.0.3-1 released

2013-07-16 Thread Michael Pasternak

* Tue Jul  16 2013 Michael Pasternak  - 3.3.0.3-1
- rename package to ovirt-engine-sdk-python
- added "watchdog" feature #947977
- added "external tasks" feature #872719
- snapshot can persist/restore memory state now #960931
- sdk expose datetime elements as strings while schema defines them as 
xs:dateTime #960747
- removed DataCenterQuota.delete() (not supported in this version)
- removed DataCenterQuota.add() (not supported in this version)
- to cluster.add()/update() added [trusted_service: boolean] property
- to datacenter added new field [comment]
- to disk added [sgio] field to enable|disable filtering for the ScsiGenericIo
- to VmPools.add() added new property [@param vmpool.max_user_vms: int]
- to NIC added new property [custom_properties]
- to cluster.update() added new doc [@param cluster.data_center.id: string]
- to host.fence() added parameter action.fence_type
- to StorageDomain.delete() added doc host.id|name
- to StorageDomains.add() added doc [@param storagedomain.storage_format: 
string]
- to VM added new sub-collection VMApplications


For more details see [1].

[1] http://wiki.ovirt.org/Python-sdk-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] ovirt-shell

2013-07-09 Thread Michael Pasternak
Hi,

On 07/09/2013 03:52 PM, Wolfgang Bucher wrote:
> Hi
> i have a fresh install with centos 6.4 and ovirt-engine from ovirt repo.
> Now I get the following error when i try to start ovirt-shell:
> 
> Traceback (most recent call last):
>   File "/usr/bin/ovirt-shell", line 5, in 
> from pkg_resources import load_entry_point
>   File "/usr/lib/python2.6/site-
> packages/pkg_resources.py", line 2655, in
> 
> working_set.require(__requires__)
>   File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 648, in
> require
> needed = self.resolve(parse_requirements(requirements))
>   File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 546, in
> resolve
> raise DistributionNotFound(req)
> pkg_resources.DiAny IdeasstributionNotFound: pexpect-u>=2.3

you should be installing pexpect as ovirt-shell depends on it,

btw what version of oVirt do you have installed? if it's 3.3, you
can use ovirt-shell 3.3.0.2-1 (you can also use it against 3.2, but
you may see features which yet not available in 3.2) it doesn't have
pexpect dependency, grab it from PyPi if it not available at oVirt nightly
repos.

> 
> Install version of pexpect: Package pexpect-2.3-6.el6.noarch already
> installed and latest version
> 
> 
> Any Ideas
> 
> 
> ___________
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-java 1.0.0.10-1 released

2013-07-08 Thread Michael Pasternak

* Thu  Jul 8 2013 Michael Pasternak  - 1.0.0.10-1
- to cluster.add()/.update() added [trusted_service] property
- implement Secure Socket Layer (SSL) host verification (CA certificate)
- allow nullifying headers via passing NULL as header value


More details can be found at [1].

[1] http://www.ovirt.org/Java-sdk-changelog
-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Putting the host in maintenance mode via python SDK

2013-07-02 Thread Michael Pasternak
On 07/02/2013 07:38 AM, Deepthi Dharwar wrote:
> On 07/01/2013 06:08 PM, Michael Pasternak wrote:
>> On 07/01/2013 02:37 PM, Vladimir Vyazmin wrote:
>>> Hi,
>>>
>>> There is any a via pythonSDK to put the host in maintenance mode:
>>>
>>> hostObject = API.hosts.get(fakeHostNames)
>>>
>>> turboMaintenanceHost(hostObject)
>>>
>>> # Turbo Maintenance Host #
>>> def turboMaintenanceHost(vmObject):
>>> """ maintenance Host"""
>>> if vmObject.status.state == 'up':
>>> vmObject.deactivate()
>>> LOGGER.info(TimestampScale() + "Object '%s' maintenance." % 
>>> vmObject.name)
>>> else:
>>> LOGGER.warning(TimestampScale() + "Failed maintenance '%s' Object." 
>>> % vmObject.name)
>>> return True
>>>
> 
> Thanks for this piece of code. Shall give it a try.
> 
>>>
>>>
>>>
>>> - Original Message -
>>>> From: "Deepthi Dharwar" 
>>>> To: users@ovirt.org, "Michael Pasternak" 
>>>> Sent: Monday, July 1, 2013 2:13:09 PM
>>>> Subject: [Users] Putting the host in maintenance mode via python SDK
>>>>
>>>> Hi,
>>>>
>>>> I am trying to switch off Hosts in DC which are idle.
>>>>
>>>> I wanted to know as to why start/stop of hosts options are enabled in
>>>> Power Mgmt tab only when the host is in Maintenance mode and not otherwise.
>>
>> cause you don't want to kill all vms running on this host when switching it 
>> off,
>> moving host to the maintenance mode will make them migrating to other host/s 
>> in
>> the cluster,
>>
>> actually there are much more scenarios where you want to be sure that you can
>> safely switch off the host.
> 
> So as I understand, issuing a STOP just halts the host but not migrate
> VMs . This needs to be done by putting the host in the maintenance mode
> where all the VMs running are migrated. Host is disconnected from the
> storage pool after which one can shut-down the system.
> 
> Maintenance is per-requisite mode where u explicitly tell the engine
> to migrate the VMs and disconnect host from storage and not done as part
> of integral shutdown process.

correct.

> 
>>>>
>>>> Also, is there any way via pythonSDK to put the host in maintenance mode ?
>>>>
>>>> Regards,
>>>> Deepthi
>>>>
>>>> ___
>>>> Users mailing list
>>>> Users@ovirt.org
>>>> http://lists.ovirt.org/mailman/listinfo/users
>>>>
>>>
>>
>>
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Putting the host in maintenance mode via python SDK

2013-07-01 Thread Michael Pasternak
On 07/01/2013 02:37 PM, Vladimir Vyazmin wrote:
> Hi,
> 
> There is any a via pythonSDK to put the host in maintenance mode:
> 
> hostObject = API.hosts.get(fakeHostNames)
> 
> turboMaintenanceHost(hostObject)
> 
> # Turbo Maintenance Host #
> def turboMaintenanceHost(vmObject):
> """ maintenance Host"""
> if vmObject.status.state == 'up':
> vmObject.deactivate()
> LOGGER.info(TimestampScale() + "Object '%s' maintenance." % 
> vmObject.name)
> else:
> LOGGER.warning(TimestampScale() + "Failed maintenance '%s' Object." % 
> vmObject.name)
> return True
> 
> 
> 
> 
> 
> - Original Message -
>> From: "Deepthi Dharwar" 
>> To: users@ovirt.org, "Michael Pasternak" 
>> Sent: Monday, July 1, 2013 2:13:09 PM
>> Subject: [Users] Putting the host in maintenance mode via python SDK
>>
>> Hi,
>>
>> I am trying to switch off Hosts in DC which are idle.
>>
>> I wanted to know as to why start/stop of hosts options are enabled in
>> Power Mgmt tab only when the host is in Maintenance mode and not otherwise.

cause you don't want to kill all vms running on this host when switching it off,
moving host to the maintenance mode will make them migrating to other host/s in
the cluster,

actually there are much more scenarios where you want to be sure that you can
safely switch off the host.

>>
>> Also, is there any way via pythonSDK to put the host in maintenance mode ?
>>
>> Regards,
>> Deepthi
>>
>> ___
>> Users mailing list
>> Users@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-java 1.0.0.9-1 released

2013-06-27 Thread Michael Pasternak

* Fri  Jun 28 2013 Michael Pasternak  - 1.0.0.9-1

- configure log4j programmatically


More details can be found at [1].

[1] http://www.ovirt.org/Java-sdk-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-java 1.0.0.8-1 released

2013-06-25 Thread Michael Pasternak

* Thu  Jun 25 2013 Michael Pasternak  - 1.0.0.8-1
- implement support for the /capabilities resource
- implement basic debugging capabilities
- added VMApplications sub-collection
- to datacenter added new field [comment]
- to disk added [sgio] field to enable|disable filtering for the ScsiGenericIo
- to StorageDomain.delete() added storagedomain.host.id|name
- to VmPool added MaxUserVMs property
- to cluster.update() added [cluster.data_center.id]
- to host.fence() added action.fence_type
- to storagedomain.delete() added [storagedomain.format]
- to nic added [nic.custom_properties.custom_property]
- to vm.add(), vm.update() added [vm.memory_policy.guaranteed]



More details can be found at [1].

[1] http://www.ovirt.org/Java-sdk-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D


___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Using python sdk to find the VMs running on a host.

2013-06-25 Thread Michael Pasternak
On 06/25/2013 09:28 AM, Itamar Heim wrote:
> On 06/25/2013 07:54 AM, Deepthi Dharwar wrote:
>> Hi,
>>
>> I am using the ovirt-python-sdk to figure out if the host is idle or
>> not. The way to determine if the host is idle at a given instant is
>> finding out the number of VMs running on it. If the number of VMs = 0
>> implies host is idle.
> 
> adding michael for the rest of the question, but please note to check for SPM 
> role of a host before assuming it is idle.
> 
> also, may i ask what you are trying to accomplish (it sounds like a power 
> saving policy)?
> 
>>
>> I was exploring the python sdk to figure out Host-VMs mapping i.e What
>> are the VMs running on the different host.
>>
>> Looks like the only way to find this, is to query each VM in /api/vms
>> list to get the host on which it is running.
>>
>> Is this the right way ? Is there no direct query or REST API to list
>> the VMs running on a given host at that instant.

you can run query="host = X" for that.

>>
>> I was looking to get the data center hierarchy structure.
>> Number_of_datacenters
>>|
>>V
>> clusters in each data center
>>|
>>V
>> Hosts in each cluster
>>|
>>V
>>   VMs on each host.
>>
>> This kind of mapping as seen on the GUI. Is there any way to obtain
>> the same from the ovirt-python-sdk ?

you can combine query to fetch vms by dc+cluster+host,

query = "datacenter = x and cluster = y and host = z"

also you can fetch hosts from the given cluster

cluster=x

same for cluster

"Datacenter.name = x"

>>
>> With this information, this would help me write scripts to turn-off my
>> hosts if idle automatically and power them on as required.
>>
>> Regards,
>> Deepthi
>>
>>
>>
>> ___
>> Users mailing list
>> Users@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users
>>
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Python-sdk for oVirt 3.3

2013-06-15 Thread Michael Pasternak

Hi Romil,

On 06/15/2013 01:17 PM, Romil Gupta wrote:
> Hi All,
> 
> Which *ovirt**-engine-sdk* version is recommended for *oVirt 3.3* ? 

latest version available is 3.3.0.2-1.

> 
> -- 
> *Thanks,*
> *Romil 
> *


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Problems using the PythonSDK

2013-06-04 Thread Michael Pasternak

Karli,

On 06/04/2013 04:05 PM, Karli Sjöberg wrote:
> Hello everyone!
> 
> I´m almost done with Python for now. But the last thing I sitll can´t seem to 
> get any hang on is how to change the name of a VM´s disk:

please use disk.alias property, name is deprecated and for backward 
compatibility only.

> 
>>>> from ovirtsdk.api import API
>>>> from ovirtsdk.xml import params
>>>> api = API(url='https://${OVIRT}:443 <https://storm.slu.se:443>', 
>>>> ca_file='/etc/pki/ovirt-engine/ca.pem', username='admin@internal 
>>>> ',
> password='letmein!')
>>>> VM_NAME = 'FedoraTest'
>>>> DISK_NAME = '%s_Disk1' % (VM_NAME)
>>>> vm = api.vms.get(VM_NAME)
>>>> vmdisk = vm.disks.list()[0]
>>>> vmdisk.alias = 'foobar'
>>>> vmdisk.name = 'foobar'
>>>> vmdisk.update()
> 
> 
> But the name/alias/whatev never changes...
> 
> Could you please give me an exact, and working example of how to change the 
> name of a VM´s disk. This is the last simple thing I would like to accomplish 
> before sharing a
> little something back with y´all(teaser, teaser).
> 
> /Karli
> 
> sön 2013-05-26 klockan 02:48 -0400 skrev Ilia Meerovich:
>> Hi,
>>
>> Lets follow http://www.ovirt.org/Python-sdk 
>>
>> In [1]: from ovirtsdk.xml import params
>>
>> In [2]: from ovirtsdk.api import API 
>>
>> In [3]: 
>>
>> In [4]: api = API(***, ***, ***)
>>
>> In [5]: user_name = "***"
>>
>> In [6]: domain = "***.***.***.redhat.com"
>>
>> In [7]: user_domain = params.Domain(name=domain)
>>
>> In [8]: user_name = "{0}@{1}".format(user_name, domain) 
>> # creating user 
>> In [9]: new_user = params.User(domain=user_domain, user_name=user_name)
>> # adding user to users resource 
>> In [10]: user = api.users.add(new_user)
>> # adding role to user
>> In [11]: user.roles.add(api.roles.get('UserRole'))
>> Out[11]: 
>>
>> Thanks
>> Ilia
>>
>> - Original Message -
>> From: "Karli Sjöberg" mailto:karli.sjob...@slu.se>>
>> To: "Ilia Meerovich" mailto:imeer...@redhat.com>>
>> Cc: "Michael Pasternak" mailto:mpast...@redhat.com>>, 
>> "users" mailto:users@ovirt.org>>, "Elena Dolinin" 
>> mailto:edoli...@redhat.com>>
>> Sent: Friday, May 24, 2013 8:04:43 AM
>> Subject: Re: [Users] Problems using the PythonSDK
>>
>> tor 2013-05-23 klockan 08:53 -0400 skrev Ilia Meerovich: 
>>
>> It should be like:
>>
>> from ovirtsdk.xml import params
>> from ovirtsdk.api import API 
>>
>> api = API('*', '*', '*')
>> vm = api.vms.list()[0]
>> user =  api.users.list()[1]
>> role = api.roles.list()[1]
>> permit = params.Permission()
>> permit.set_role(role)
>> permit.set_vm(vm)
>> user.permissions.add(permit) 
>> Thank you very much, I´m going to test this out today! Could you also show 
>> me how to first add a user that isn´t in the system yet, please? 
>>
>>
>>
>> - Original Message -
>> From: "Ilia Meerovich" < imeer...@redhat.com <mailto:imeer...@redhat.com> >
>> To: "Michael Pasternak" < mpast...@redhat.com <mailto:mpast...@redhat.com> >
>> Cc: "users" < users@ovirt.org <mailto:users@ovirt.org> >, "Karli Sjöberg" < 
>> karli.sjob...@slu.se <mailto:karli.sjob...@slu.se> >, "Elena Dolinin" < 
>> edoli...@redhat.com <mailto:edoli...@redhat.com> >
>> Sent: Thursday, May 23, 2013 3:30:27 PM
>> Subject: Re: [Users] Problems using the PythonSDK
>>
>> Hi,
>>
>> We have several tests like:
>> "Add VM permission to user", that are using ART's 
>> art/rhevm_api/tests_lib/low_level/mla.py addPermitsToUser function.
>> This is generic function but it shouldn't be hard to prepare SDK code with 
>> the same functionality.
>>
>> Thanks 
>> Ilia
>>
>> - Original Message -
>> From: "Michael Pasternak" < mpast...@redhat.com <mailto:mpast...@redhat.com> 
>> >
>> To: "Karli Sjöberg" < karli.sjob...@slu.se <mailto:karli.sjob...@slu.se> >, 
>> "Elena Dolinin" < edoli...@redhat.com <mailto:edoli...@redhat.com> >, "Ilia 
>> Meerovich" < imeer...@redha

[Users] ovirt-engine-sdk-java 1.0.0.7-1 released

2013-06-04 Thread Michael Pasternak

- updated storagedomain add()/update() docs
- updated tag update() docs
- enabled correct generation of Boolean getters/setters
  to enable Bean Introspection apis (bollean getters will
  be prefixed with getX())
- fixed docs for GlusterBricks add|update
- fixed docs for add|update Tag
- added [network.usages.usage] to ClusterNetworks
- in add TemplateNICs, network.id|name is no longer mandatory
- StorageDomainVM can be removed asynchronously now
- removed DataCenterQuota.add|delete (yet not supported)


More details can be found at [1].

[1] http://www.ovirt.org/Java-sdk-changelog


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Problems using the PythonSDK

2013-05-23 Thread Michael Pasternak
On 05/23/2013 03:53 PM, Karli Sjöberg wrote:
> tor 2013-05-23 klockan 15:10 +0300 skrev Michael Pasternak:
>> Hi Karli,
>>
>> On 05/23/2013 12:35 PM, Karli Sjöberg wrote:
>> > Hi!
>> > 
>> > We´re in the process of building an orderportal where our customers will 
>> > be able to log in, select a virtual machine template, type in a desired 
>> > hostname and it will be
>> > automatically created, and they recieve a mail explaining what they´ve 
>> > gotten themselves into:). For this I figured the PythonSDK would be the 
>> > best choice but I´m having
>> > trouble using it. What we´ve done so far is:
>> > 
>> > 1) Create a new VM from a template; OK. I found an example and it worked 
>> > OOTB
>> > 2) Rename the new VM´s disk from ${TemplateName}_Disk1 to ${VMName}_Disk1; 
>> > Not OK. I found an example of how to change the name of a VMNic and that 
>> > works, but using the
>> > same method to change VMDisk´s name does not (FYI, the VM only has one 
>> > VNic and VDisk):
>> >>>> from ovirtsdk.xml import params
>> >>>> from ovirtsdk.api import API
>> >>>> api = API(url='https://${ENGINE}:443/api', 
>> >>>> <https://storm.slu.se:443/api',> ca_file='${CACERT}', 
>> >>>> username='admin@internal ', password='letmein!')
>> >>>> vm = api.vms.get(name='VMName')
>> > 
>> >>>> vmnic = vm.nics.get(name='*')
>> >>>> vmnic.name
>> > 'nic1'
>> >>>> api.vms.get(name='VMName').nics.get(name='*')
>> > 'nic1'
>> >>>> vmnic.name='nic2'
>> >>>> vmnic.update()
>> >>>> api.vms.get(name='VMName').nics.get(name='*')
>> > 'nic2'
>> >>>> vmnic.name
>> > 'nic2'
>> > 
>> >>>> vmdisk = vm.disks.get(name='*')
>> >>>> vmdisk.name
>> > 'TemplateName_Disk1'
>> >>>> api.vms.get(name='VMName').disks.get(name='*')
>>
>> this kind of call is not efficient, by fetching the disk
>> you also fetch the vm,
>>
>> i'd suggest fetch vm, store it in local variable and then
>> reuse it for any sub-collection manipulations.
> 
> Could you please show me example of that, my Pythonjourney started only 
> yesterday:)?

api = API(...)

myvm = api.vms.get(name='VMName')

myvm.disks.get(name='...')
myvm.nics.get(name='...')

myvm.disks.add()
myvm.disks.list()


> 
>>
>>
>> > 'TemplateName_Disk1'
>> >>>> vmdisk.name='VMName_Disk1'
>> >>>> vmdisk.update()
>> >>>> vmdisk.name
>> > 'VMName_Disk1'
>> >>>> api.vms.get(name='VMName').disks.get(name='*')
>> > 'TemplateName_Disk1'
>> > 
>> > See? Am I holding it wrong?
>>
>> disk.name is deprecated, please use 'alias' instead.
> 
>>>> print api.vms.get(name='VMName').disks.get(name='*').name
> TemplateName_Disk1
>>>> print api.vms.get(name='VMName').disks.get(name='*').alias
> None
> 
> So that doesn´t seem to work either?
> 
> /Karli
> 
>>
>> > 
>> > 3) Create a snapshot called "Origin", so if a customer calls in and says 
>> > they´ve borked it completely, we´ll just revert to it´s "Origin" and 
>> > they´re up and running again;
>> > OK, found another OOTB example, thank you.
>> > 4) Add the customer to VM´s Permissions with an appropriate role; Not OK. 
>> > I have found no examples on how to do this and just don´t know where to 
>> > start looking. BTW,
>> > creating a new VM with Python results in Permissions completely empty, no 
>> > inheritance either. Don´t know if that is intended...
>>
>> elena, ilia,
>>
>> guys, do you have any permission related code to share?
>>
>> > 
>> > client# rpm -qa | grep ovirt
>> > ovirt-engine-cli-3.2.0.11-1.fc17.noarch
>> > ovirt-engine-sdk-3.2.0.10-1.fc17.noarch
>> > 
>> > engine# rpm -qa | grep ovirt
>> > ovirt-engine-config-3.1.0-4.fc17.noarch
>> > ovirt-engine-dbscripts-3.1.0-4.fc17.noarch
>> > ovirt-log-collector-3.1.0-0.git10d719.fc17.noarch

Re: [Users] Problems using the PythonSDK

2013-05-23 Thread Michael Pasternak

Hi Karli,

On 05/23/2013 12:35 PM, Karli Sjöberg wrote:
> Hi!
> 
> We´re in the process of building an orderportal where our customers will be 
> able to log in, select a virtual machine template, type in a desired hostname 
> and it will be
> automatically created, and they recieve a mail explaining what they´ve gotten 
> themselves into:). For this I figured the PythonSDK would be the best choice 
> but I´m having
> trouble using it. What we´ve done so far is:
> 
> 1) Create a new VM from a template; OK. I found an example and it worked OOTB
> 2) Rename the new VM´s disk from ${TemplateName}_Disk1 to ${VMName}_Disk1; 
> Not OK. I found an example of how to change the name of a VMNic and that 
> works, but using the
> same method to change VMDisk´s name does not (FYI, the VM only has one VNic 
> and VDisk):
>>>> from ovirtsdk.xml import params
>>>> from ovirtsdk.api import API
>>>> api = API(url='https://${ENGINE}:443/api', 
>>>> <https://storm.slu.se:443/api',> ca_file='${CACERT}', 
>>>> username='admin@internal ', password='letmein!')
>>>> vm = api.vms.get(name='VMName')
> 
>>>> vmnic = vm.nics.get(name='*')
>>>> vmnic.name
> 'nic1'
>>>> api.vms.get(name='VMName').nics.get(name='*')
> 'nic1'
>>>> vmnic.name='nic2'
>>>> vmnic.update()
>>>> api.vms.get(name='VMName').nics.get(name='*')
> 'nic2'
>>>> vmnic.name
> 'nic2'
> 
>>>> vmdisk = vm.disks.get(name='*')
>>>> vmdisk.name
> 'TemplateName_Disk1'
>>>> api.vms.get(name='VMName').disks.get(name='*')

this kind of call is not efficient, by fetching the disk
you also fetch the vm,

i'd suggest fetch vm, store it in local variable and then
reuse it for any sub-collection manipulations.


> 'TemplateName_Disk1'
>>>> vmdisk.name='VMName_Disk1'
>>>> vmdisk.update()
>>>> vmdisk.name
> 'VMName_Disk1'
>>>> api.vms.get(name='VMName').disks.get(name='*')
> 'TemplateName_Disk1'
> 
> See? Am I holding it wrong?

disk.name is deprecated, please use 'alias' instead.

> 
> 3) Create a snapshot called "Origin", so if a customer calls in and says 
> they´ve borked it completely, we´ll just revert to it´s "Origin" and they´re 
> up and running again;
> OK, found another OOTB example, thank you.
> 4) Add the customer to VM´s Permissions with an appropriate role; Not OK. I 
> have found no examples on how to do this and just don´t know where to start 
> looking. BTW,
> creating a new VM with Python results in Permissions completely empty, no 
> inheritance either. Don´t know if that is intended...

elena, ilia,

guys, do you have any permission related code to share?

> 
> client# rpm -qa | grep ovirt
> ovirt-engine-cli-3.2.0.11-1.fc17.noarch
> ovirt-engine-sdk-3.2.0.10-1.fc17.noarch
> 
> engine# rpm -qa | grep ovirt
> ovirt-engine-config-3.1.0-4.fc17.noarch
> ovirt-engine-dbscripts-3.1.0-4.fc17.noarch
> ovirt-log-collector-3.1.0-0.git10d719.fc17.noarch
> ovirt-engine-restapi-3.1.0-4.fc17.noarch
> ovirt-image-uploader-3.1.0-0.git9c42c8.fc17.noarch
> ovirt-engine-genericapi-3.1.0-4.fc17.noarch
> ovirt-iso-uploader-3.1.0-0.git1841d9.fc17.noarch
> ovirt-engine-webadmin-portal-3.1.0-4.fc17.noarch
> ovirt-engine-setup-3.1.0-4.fc17.noarch
> ovirt-engine-sdk-3.2.0.2-1.fc17.noarch
> ovirt-engine-backend-3.1.0-4.fc17.noarch
> ovirt-engine-tools-common-3.1.0-4.fc17.noarch
> ovirt-engine-3.1.0-4.fc17.noarch
> ovirt-engine-userportal-3.1.0-4.fc17.noarch
> ovirt-engine-notification-service-3.1.0-4.fc17.noarch
> 
> -- 
> 
> Best Regards
> ---
> Karli Sjöberg
> Swedish University of Agricultural Sciences
> Box 7079 (Visiting Address Kronåsvägen 8)
> S-750 07 Uppsala, Sweden
> Phone:  +46-(0)18-67 15 66
> karli.sjob...@slu.se <mailto:karli.sjob...@adm.slu.se>
> 
> 
> 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Fwd: Nagios monitoring plugin check_rhev3 1.2 released

2013-05-23 Thread Michael Pasternak
On 05/23/2013 01:04 PM, Michael Pasternak wrote:
> On 05/23/2013 12:37 PM, Itamar Heim wrote:
>> On 05/23/2013 12:36 PM, Michael Pasternak wrote:
>>> On 05/23/2013 11:22 AM, Itamar Heim wrote:
>>>> On 05/23/2013 11:21 AM, René Koch (ovido) wrote:
>>>>>
>>>>> On Thu, 2013-05-23 at 11:11 +0300, Itamar Heim wrote:
>>>>>> On 05/23/2013 11:07 AM, René Koch (ovido) wrote:
>>>>>>> On Thu, 2013-05-23 at 10:55 +0300, Sasha Chuzhoy wrote:
>>>>>>>> On 05/22/2013 05:18 PM, Itamar Heim wrote:
>>>>>>>>> On 05/22/2013 03:55 PM, René Koch (ovido) wrote:
>>>>>>>>>>
>>>>>>>>>> On Wed, 2013-05-22 at 14:59 +0300, Itamar Heim wrote:
>>>>>>>>>>>>  Original Message 
>>>>>>>>>>>> Subject: [Users] Nagios monitoring plugin check_rhev3 1.2 released
>>>>>>>>>>>> Date: Thu, 16 May 2013 16:31:24 +0200
>>>>>>>>>>>> From: René Koch 
>>>>>>>>>>>> To: users 
>>>>>>>>>>>>
>>>>>>>>>>>> I'm happy to announce version 1.2 of check_rhev3.
>>>>>>>>>>>>
>>>>>>>>>>>> check_rhev3 is a monitoring plugin for Icinga/Nagios and it's 
>>>>>>>>>>>> forks,
>>>>>>>>>>>> which is
>>>>>>>>>>>> used to monitor datacenters, clusters, hosts, vms, vm pools and
>>>>>>>>>>>> storage
>>>>>>>>>>>> domains
>>>>>>>>>>>> of Red Hat Enterprise Virtualization (RHEV) and oVirt 
>>>>>>>>>>>> virtualization
>>>>>>>>>>>> environments.
>>>>>>>>>>>>
>>>>>>>>>>>> The download locations are
>>>>>>>>>>>>*
>>>>>>>>>>>> https://labs.ovido.at/download/check_rhev3/check_rhev3-1.2.tar.gz
>>>>>>>>>>>>*
>>>>>>>>>>>> https://labs.ovido.at/download/check_rhev3/nagios-plugins-rhev3-1.2-1.el6.i686.rpm
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>*
>>>>>>>>>>>> https://labs.ovido.at/download/check_rhev3/nagios-plugins-rhev3-1.2-1.el6.x86_64.rpm
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> For further information on how to install this plugin visit:
>>>>>>>>>>>>
>>>>>>>>>>>> https://github.com/ovido/check_rhev3/wiki/Installation-Documentation
>>>>>>>>>>>>
>>>>>>>>>>>> A detailed usage documentation can be found here:
>>>>>>>>>>>> https://github.com/ovido/check_rhev3/wiki/Usage-Documentation
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Changelog:
>>>>>>>>>>>>
>>>>>>>>>>>> - General:
>>>>>>>>>>>> -   Moved project to github: https://github.com/ovido/check_rhev3
>>>>>>>>>>>>
>>>>>>>>>>>> - New features:
>>>>>>>>>>>> -   Verify RHEV-M certificate
>>>>>>>>>>>> -   Allow authentication sessions for authentication in RHEV >= 3.1
>>>>>>>>>>>> and
>>>>>>>>>>>> oVirt >= 3.1
>>>>>>>>>>>> -   Use option -n  to check a specific nic
>>>>>>>>>>>>
>>>>>>>>>>>> - Bugs fixed:
>>>>>>>>>>>> -   Performance data issue with check_multi
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> If you have any questions or ideas, please drop me an email: ​
>>>>>>>>>>>> r.k...@ovido.at.
>>&g

Re: [Users] Fwd: Nagios monitoring plugin check_rhev3 1.2 released

2013-05-23 Thread Michael Pasternak
On 05/23/2013 12:37 PM, Itamar Heim wrote:
> On 05/23/2013 12:36 PM, Michael Pasternak wrote:
>> On 05/23/2013 11:22 AM, Itamar Heim wrote:
>>> On 05/23/2013 11:21 AM, René Koch (ovido) wrote:
>>>>
>>>> On Thu, 2013-05-23 at 11:11 +0300, Itamar Heim wrote:
>>>>> On 05/23/2013 11:07 AM, René Koch (ovido) wrote:
>>>>>> On Thu, 2013-05-23 at 10:55 +0300, Sasha Chuzhoy wrote:
>>>>>>> On 05/22/2013 05:18 PM, Itamar Heim wrote:
>>>>>>>> On 05/22/2013 03:55 PM, René Koch (ovido) wrote:
>>>>>>>>>
>>>>>>>>> On Wed, 2013-05-22 at 14:59 +0300, Itamar Heim wrote:
>>>>>>>>>>>  Original Message 
>>>>>>>>>>> Subject: [Users] Nagios monitoring plugin check_rhev3 1.2 released
>>>>>>>>>>> Date: Thu, 16 May 2013 16:31:24 +0200
>>>>>>>>>>> From: René Koch 
>>>>>>>>>>> To: users 
>>>>>>>>>>>
>>>>>>>>>>> I'm happy to announce version 1.2 of check_rhev3.
>>>>>>>>>>>
>>>>>>>>>>> check_rhev3 is a monitoring plugin for Icinga/Nagios and it's forks,
>>>>>>>>>>> which is
>>>>>>>>>>> used to monitor datacenters, clusters, hosts, vms, vm pools and
>>>>>>>>>>> storage
>>>>>>>>>>> domains
>>>>>>>>>>> of Red Hat Enterprise Virtualization (RHEV) and oVirt virtualization
>>>>>>>>>>> environments.
>>>>>>>>>>>
>>>>>>>>>>> The download locations are
>>>>>>>>>>>*
>>>>>>>>>>> https://labs.ovido.at/download/check_rhev3/check_rhev3-1.2.tar.gz
>>>>>>>>>>>*
>>>>>>>>>>> https://labs.ovido.at/download/check_rhev3/nagios-plugins-rhev3-1.2-1.el6.i686.rpm
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>*
>>>>>>>>>>> https://labs.ovido.at/download/check_rhev3/nagios-plugins-rhev3-1.2-1.el6.x86_64.rpm
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> For further information on how to install this plugin visit:
>>>>>>>>>>>
>>>>>>>>>>> https://github.com/ovido/check_rhev3/wiki/Installation-Documentation
>>>>>>>>>>>
>>>>>>>>>>> A detailed usage documentation can be found here:
>>>>>>>>>>> https://github.com/ovido/check_rhev3/wiki/Usage-Documentation
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Changelog:
>>>>>>>>>>>
>>>>>>>>>>> - General:
>>>>>>>>>>> -   Moved project to github: https://github.com/ovido/check_rhev3
>>>>>>>>>>>
>>>>>>>>>>> - New features:
>>>>>>>>>>> -   Verify RHEV-M certificate
>>>>>>>>>>> -   Allow authentication sessions for authentication in RHEV >= 3.1
>>>>>>>>>>> and
>>>>>>>>>>> oVirt >= 3.1
>>>>>>>>>>> -   Use option -n  to check a specific nic
>>>>>>>>>>>
>>>>>>>>>>> - Bugs fixed:
>>>>>>>>>>> -   Performance data issue with check_multi
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> If you have any questions or ideas, please drop me an email: ​
>>>>>>>>>>> r.k...@ovido.at.
>>>>>>>>>>>
>>>>>>>>>>> Thank you for using check_rhev3.
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Hi Rene,
>>>>>>>>>>
>>>>>>>>

Re: [Users] Fwd: Nagios monitoring plugin check_rhev3 1.2 released

2013-05-23 Thread Michael Pasternak
t;>>>> -o, --cookie
>>>>>>>Use cookie based authenticated sessions (requires RHEV >= 3.1)
>>>>>>>
>>>>>>>
>>>>>>> I implemented it in the following way:
>>>>>>> - Plugin checks if file with session cookie exists (per default
>>>>>>> in /var/tmp)
>>>>>>> - If not: login with username and password (that's why you need to
>>>>>>> specify auth pair or authfile) and fetch JSESSIONID
>>>>>>> -- Writes ID into session cookie file
>>>>>>> - If cookie file is found: login using JSESSIONID and ignore username
>>>>>>> and password. So you can change username/password and login will still
>>>>>>> work.
>>>>>>> - If login using session ID fails and cookie file exists, it will be
>>>>>>> deleted and a login with username and password is tried the next time
>>>>>>> the plugin is executed
>>>>>>>
>>>>>>> If you start the script with -vvv you can see if login is down with auth
>>>>>>> session or with username/password...
>>>>>>>
>>>>>>> I didn't test it with oVirt 3.2 (yet), but works fine in RHEV 3.1.
>>>>>>
>>>>>> well, we are trying it with next version of RHEV actually :)
>>>>>> sasha - can you please start the script with -vvv to provide the log
>>>>>> for login behavior?
>>>>>>
>>>>> Here is all (I hope) the relevant data:
>>>>> [V] Starting the main script.
>>>>> [V] Checking which component to monitor.
>>>>> [D] check_host: Called function check_host.
>>>>> [V] Host: Checking host .
>>>>> [V] Host: No subcheck is specified, checking memory usage.
>>>>> [D] check_statistics: Called function check_statistics.
>>>>> [V] Statistics: Checking statistics of hosts.
>>>>> [D] check_statistics: Input parameter $component: hosts
>>>>> [D] check_statistics: Input parameter $search:
>>>>> [D] check_statistics: Input parameter $statistics: memory
>>>>> [D] check_statistics: Converting variables.
>>>>> [D] check_statistics: Converted variable $url: hosts
>>>>> [D] get_result: Called function get_result.
>>>>> [D] get_result: Input parameter $_[0]: /hosts?search=
>>>>> [D] get_result: Input parameter $xml: hosts
>>>>> [D] get_result: Input parameter $search: id
>>>>> [D] rhev_connect: Called function rhev_connect.
>>>>> [V] REST-API: Connecting to REST-API.
>>>>> [D] rhev_connect: Input parameter: /hosts?search=.
>>>>> [V] REST-API: RHEVM-API URL: https://:8443/api/hosts?search=
>>>>> [V] REST-API: RHEVM-API User: 
>>>>> [V] REST-API: RHEVM-API Password: 
>>>>> [V] REST-API: cookie filename:
>>>>> bm90dDA0LmVuZy5sYWIudGx2LnJlZGhhdC5jb20tdmlld2VyQG5vdHQwNC5lbmcubGFiLnRsdi5y
>>>>> ZWRoYXQuY29tCg==
>>>>> [D] rhev_connect: Using username and password authentication.
>>>>> [V] REST-API: Cache-Control: no-cache
>>>>> Connection: close
>>>>> Date: Thu, 23 May 2013 07:50:33 GMT
>>>>> Pragma: No-cache
>>>>> Server: Apache-Coyote/1.1
>>>>> Content-Type: application/xml
>>>>> Expires: Thu, 01 Jan 1970 02:00:00 IST
>>>>> Client-Date: Thu, 23 May 2013 07:50:33 GMT
>>>>> Client-Peer: 10.35.16.97:8443
>>>>> Client-Response-Num: 1
>>>>> Client-SSL-Cert-Issuer: /C=US/O=Red Hat TLV/CN=CA-.31149
>>>>> Client-SSL-Cert-Subject: /C=US/O=Red Hat TLV/CN=
>>>>> Client-SSL-Cipher: DHE-RSA-AES256-SHA
>>>>> Client-SSL-Warning: Peer certificate not verified
>>>>> Set-Cookie: JSESSIONID=8gUbxG1-uk8HOi2tq4krw7tq; Path=/api; Secure
>>>>> [D] rhev_connect: 
>>>>> 
>>>>> # The output is truncated 
>>>>
>>>>
>>>> It seems to me that you did start the plugin without "-o" option...
>>>>
>>>> Without -o plugin uses username + password authentication (to be
>>>> compatible with RHEV 3.0, oVirt 3.0 - especially to not break existing
>>>> setups):
>>>> $ ./check_rhev3 -H localhost -f authfile -D -vvv
>>>> [V] REST-API: cookie filename: cmhldm0tYWRtaW5AaW50ZXJuYWwK
>>>> [D] rhev_connect: Using username and password authentication.
>>>>
>>>> With -o a cookie file it uses username + password when the cookie file
>>>> is missing (first call):
>>>> $ ./check_rhev3 -H localhost -f authfile -D -vvv -o
>>>> [V] REST-API: cookie filename: cmhldm0tYWRtaW5AaW50ZXJuYWwK
>>>> [D] rhev_connect: Using cookie authentication.
>>>> [D] rhev_connect: No cookie file found - using username and password
>>>>
>>>> And uses session cookie if it exists:
>>>> $ ./check_rhev3 -H localhost -f authfile -D -vvv -o
>>>> [V] REST-API: cookie filename: cmhldm0tYWRtaW5AaW50ZXJuYWwK
>>>> [D] rhev_connect: Using cookie authentication.
>>>> [D] rhev_connect: Using cookie: JSESSIONID=wbYehfrValieFzkv6GBWes-g
>>>>
>>>> Please try again with "-o".
>>>>
>>>>
>>>> Regards,
>>>> René
>>>>
>>>>
>>>>>> Thanks,
>>>>>>  Itamar
>>>>>>
>>>>>
>>>>>
>>>>
>>>
>>> Hi Rene,
>>>
>>> I expect most will fail on this -o.
>>> maybe add auto-detection of version or engine capabilities to try and
>>> use it, else failback to use/password?
>>>
>>> Thanks,
>>>  Itamar
>>
>>
>> That sounds like a good idea - thanks!
>> Will think on how I can implement it - either store engine
>> version/capability into a temp file or query version/capability.
>> I think a temp file is the better solutions as I don't need an
>> additional API call...
>>
>>
>> Regards,
>> René
>>
>>
>>
>>
> 
> michael - is there a rest api capability that can be used to test support of 
> user level api?

api maintains  section for the features been added in the version, 
check if you see something
related to the "user level api" (if you don't, - this is a bug).


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Ovirt CLI: Pipe is not working when reading from file

2013-05-13 Thread Michael Pasternak
On 05/13/2013 04:27 PM, semjek wrote:
> Hello,
> 
> I'm trying to script stopping all vms at once but when I'm using example 
> given in documentation, it won't work. The problem is when I read the command 
> containing pipe from
> file. When the same command is pasted into stdin, everything works fine.

it was fixed in 3.2.0.11, please make sure you're using latest sdk & cli.

> 
> [root@ovirt-administration ~]# ovirt-shell -c
> 
>  ==
>  >>> connected to oVirt manager 3.2.0.0 <<<
>  ==
> 
> 
>  ++
> 
>Welcome to oVirt shell
> 
>  ++
> 
> [oVirt shell (connected)]# list vms | grep test3
> name   : test3
> 
> oVirt shell (connected)]# exit
> [root@ovirt-administration ~]#
> 
> 
> But when I read from file:
> 
> 
> [root@ovirt-administration ~]# ovirt-shell -c -f /root/listall.txt
> 
>  ==
>  >>> connected to oVirt manager 3.2.0.0 <<<
>  ==
> 
> [oVirt shell (connected)]# list vms | grep lindev
> 
> 
> id : cd27d9fd-611e-4a3d-8eba-ae6e50c038dc
> name   : test2
> 
> id : 77cb6321-e21f-4bfb-aae6-ee178dbd9b8a
> name   : test3
> 
> id : eba23051-8285-4a46-936d-25bd37c6cf8f
> name   : test4
> 
> [oVirt shell (connected)]# exit
> 
> [root@ovirt-administration ~]#
> 
> This looks like a bug in ovirt-shell. Any thought?
> 
> Best regards
> Evgeny
> 
> 
> 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] ovirt-shell can not connect

2013-05-08 Thread Michael Pasternak
On 05/08/2013 10:54 AM, Michael Wagenknecht wrote:
> Hi Michael,
> Now it works. Thank you very much Michael.
> But one last question. Is there a parameter in the .ovirtshellrc for the ca 
> certificate?

no, it's a bug [1], can't promise, but i'll try to make sure it's get in to
the next 3.2 release, in meanwhile you can specify it via command-line.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=960983

> I tried ca-file but it didn't work.
> 
> Michael
> 
> 
> Am 08.05.2013 09:25, schrieb Michael Pasternak:
>> On 05/07/2013 09:55 AM, Michael Wagenknecht wrote:
>>> Hi,
>>> now I installed the following versions on a fedora 18 client:
>>> ovirt-engine-sdk-3.2.0.10-1.fc18.noarch
>>> ovirt-engine-cli-3.2.0.11-1.fc18.noarch
>>>
>>> Now I can connect when I run:
>>> ovirt-shell -c -A ./ca.crt -l https://172.21.114.157/api -u internal\\admin
>>>
>>> Then I try to use the .ovirtshellrc. I run:
>>> ovirt-shell -c -A ./ca.crt
>>>
>>> and get the following error:
>>> error: invalid literal for int() with base 10: ''
>> please specify the port in url, also i see you using 'domain\\user'
>> format in username, the right format is 'user@domain', please see
>> help for more details.
>>
>>> my .ovirtshellrc is:
>>>
>>> [cli]
>>> autopage = True
>>> [ovirt-shell]
>>> username = "internal\\admin"
>>> url = "https://172.21.114.157/api";
>>> insecure = False
>>> filter = False
>>> timeout = -1
>>> dont_validate_cert_chain = False
>>> password = "xxx"
>>>
>>> Regards,  Michael
>>>
>>>
>>>
>>> Am 06.05.2013 14:17, schrieb Michael Pasternak:
>>>> On 05/06/2013 03:05 PM, Michael Wagenknecht wrote:
>>>>> Hi Michael,
>>>>> we are using the rpm package:  ovirt-engine-sdk-3.2.0.9-1.el6.noarch
>>>> please update to 3.2.0.10-1, also the change you have mentioned was
>>>> added after ovirt-engine-cli-3.2.0.10 was released, - this is a part
>>>> of the 3.2.0.11-1 and this release requires .10 sdk, so either you have
>>>> baked rpm by yourself, or you using development installation,
>>>>
>>>> anyway make sure you are upgrading to the latest artifacts:
>>>>
>>>> sdk: release 3.2.0.10-1
>>>> cli: release 3.2.0.11-1
>>>>
>>>>> Regards,  Michael
>>>>>
>>>>>
>>>>>
>>>>> Am 06.05.2013 14:02, schrieb Michael Pasternak:
>>>>>> Hi Michael,
>>>>>>
>>>>>> what is the version of ovirt-engine-sdk you're using?
>>>>>>
>>>>>> On 05/06/2013 01:43 PM, Michael Wagenknecht wrote:
>>>>>>> Hi,
>>>>>>> I can not connect to the ovirt-shell. When I type:
>>>>>>>
>>>>>>> ovirt-shell -c
>>>>>>>
>>>>>>> I get the following message:
>>>>>>>
>>>>>>> error: __init__() got an unexpected keyword argument 
>>>>>>> 'validate_cert_chain'
>>>>>>>
>>>>>>>
>>>>>>> my .ovirtshellrc is:
>>>>>>>
>>>>>>> [ovirt-shell]
>>>>>>> username = admin@internal
>>>>>>> url = https//127.0.0.1:443/api
>>>>>>> insecure = False
>>>>>>> filter = False
>>>>>>> timeout = -1
>>>>>>> dont_validate_cert_chain = False
>>>>>>> password = x
>>>>>>>
>>>>>>>
>>>>>>> I'm using the rpm package:  ovirt-engine-cli-3.2.0.10-1.el6.noarch
>>>>>>>
>>>>>>> Has anyone an idea?
>>>>>>> The GUI login works.
>>>>>>>
>>>>>>> Thanks,  Michael
>>>>>>>
>>>>>>> ___
>>>>>>> Users mailing list
>>>>>>> Users@ovirt.org
>>>>>>> http://lists.ovirt.org/mailman/listinfo/users
>>>>> ___
>>>>> Users mailing list
>>>>> Users@ovirt.org
>>>>> http://lists.ovirt.org/mailman/listinfo/users
>>
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] ovirt-shell can not connect

2013-05-08 Thread Michael Pasternak
On 05/07/2013 09:55 AM, Michael Wagenknecht wrote:
> Hi,
> now I installed the following versions on a fedora 18 client:
> ovirt-engine-sdk-3.2.0.10-1.fc18.noarch
> ovirt-engine-cli-3.2.0.11-1.fc18.noarch
> 
> Now I can connect when I run:
> ovirt-shell -c -A ./ca.crt -l https://172.21.114.157/api -u internal\\admin
> 
> Then I try to use the .ovirtshellrc. I run:
> ovirt-shell -c -A ./ca.crt
> 
> and get the following error:
> error: invalid literal for int() with base 10: ''

please specify the port in url, also i see you using 'domain\\user'
format in username, the right format is 'user@domain', please see
help for more details.

> 
> my .ovirtshellrc is:
> 
> [cli]
> autopage = True
> [ovirt-shell]
> username = "internal\\admin"
> url = "https://172.21.114.157/api";
> insecure = False
> filter = False
> timeout = -1
> dont_validate_cert_chain = False
> password = "xxx"
> 
> Regards,  Michael
> 
> 
> 
> Am 06.05.2013 14:17, schrieb Michael Pasternak:
>> On 05/06/2013 03:05 PM, Michael Wagenknecht wrote:
>>> Hi Michael,
>>> we are using the rpm package:  ovirt-engine-sdk-3.2.0.9-1.el6.noarch
>> please update to 3.2.0.10-1, also the change you have mentioned was
>> added after ovirt-engine-cli-3.2.0.10 was released, - this is a part
>> of the 3.2.0.11-1 and this release requires .10 sdk, so either you have
>> baked rpm by yourself, or you using development installation,
>>
>> anyway make sure you are upgrading to the latest artifacts:
>>
>> sdk: release 3.2.0.10-1
>> cli: release 3.2.0.11-1
>>
>>> Regards,  Michael
>>>
>>>
>>>
>>> Am 06.05.2013 14:02, schrieb Michael Pasternak:
>>>> Hi Michael,
>>>>
>>>> what is the version of ovirt-engine-sdk you're using?
>>>>
>>>> On 05/06/2013 01:43 PM, Michael Wagenknecht wrote:
>>>>> Hi,
>>>>> I can not connect to the ovirt-shell. When I type:
>>>>>
>>>>> ovirt-shell -c
>>>>>
>>>>> I get the following message:
>>>>>
>>>>> error: __init__() got an unexpected keyword argument 'validate_cert_chain'
>>>>>
>>>>>
>>>>> my .ovirtshellrc is:
>>>>>
>>>>> [ovirt-shell]
>>>>> username = admin@internal
>>>>> url = https//127.0.0.1:443/api
>>>>> insecure = False
>>>>> filter = False
>>>>> timeout = -1
>>>>> dont_validate_cert_chain = False
>>>>> password = x
>>>>>
>>>>>
>>>>> I'm using the rpm package:  ovirt-engine-cli-3.2.0.10-1.el6.noarch
>>>>>
>>>>> Has anyone an idea?
>>>>> The GUI login works.
>>>>>
>>>>> Thanks,  Michael
>>>>>
>>>>> ___
>>>>> Users mailing list
>>>>> Users@ovirt.org
>>>>> http://lists.ovirt.org/mailman/listinfo/users
>>> ___
>>> Users mailing list
>>> Users@ovirt.org
>>> http://lists.ovirt.org/mailman/listinfo/users
>>
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] ovirt-shell can not connect

2013-05-06 Thread Michael Pasternak

On 05/06/2013 03:05 PM, Michael Wagenknecht wrote:
> Hi Michael,
> we are using the rpm package:  ovirt-engine-sdk-3.2.0.9-1.el6.noarch

please update to 3.2.0.10-1, also the change you have mentioned was
added after ovirt-engine-cli-3.2.0.10 was released, - this is a part
of the 3.2.0.11-1 and this release requires .10 sdk, so either you have
baked rpm by yourself, or you using development installation,

anyway make sure you are upgrading to the latest artifacts:

sdk: release 3.2.0.10-1
cli: release 3.2.0.11-1

> 
> Regards,  Michael
> 
> 
> 
> Am 06.05.2013 14:02, schrieb Michael Pasternak:
>> Hi Michael,
>>
>> what is the version of ovirt-engine-sdk you're using?
>>
>> On 05/06/2013 01:43 PM, Michael Wagenknecht wrote:
>>> Hi,
>>> I can not connect to the ovirt-shell. When I type:
>>>
>>> ovirt-shell -c
>>>
>>> I get the following message:
>>>
>>> error: __init__() got an unexpected keyword argument 'validate_cert_chain'
>>>
>>>
>>> my .ovirtshellrc is:
>>>
>>> [ovirt-shell]
>>> username = admin@internal
>>> url = https//127.0.0.1:443/api
>>> insecure = False
>>> filter = False
>>> timeout = -1
>>> dont_validate_cert_chain = False
>>> password = x
>>>
>>>
>>> I'm using the rpm package:  ovirt-engine-cli-3.2.0.10-1.el6.noarch
>>>
>>> Has anyone an idea?
>>> The GUI login works.
>>>
>>> Thanks,  Michael
>>>
>>> ___
>>> Users mailing list
>>> Users@ovirt.org
>>> http://lists.ovirt.org/mailman/listinfo/users
>>
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] ovirt-shell can not connect

2013-05-06 Thread Michael Pasternak

Hi Michael,

what is the version of ovirt-engine-sdk you're using?

On 05/06/2013 01:43 PM, Michael Wagenknecht wrote:
> Hi,
> I can not connect to the ovirt-shell. When I type:
> 
> ovirt-shell -c
> 
> I get the following message:
> 
> error: __init__() got an unexpected keyword argument 'validate_cert_chain'
> 
> 
> my .ovirtshellrc is:
> 
> [ovirt-shell]
> username = admin@internal
> url = https//127.0.0.1:443/api
> insecure = False
> filter = False
> timeout = -1
> dont_validate_cert_chain = False
> password = x
> 
> 
> I'm using the rpm package:  ovirt-engine-cli-3.2.0.10-1.el6.noarch
> 
> Has anyone an idea?
> The GUI login works.
> 
> Thanks,  Michael
> 
> _______
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-cli 3.3.0.2 released

2013-05-01 Thread Michael Pasternak

- datetime.datetime object has no attribute __dict__ #957519
- remove pexpect dependency
- Ping command success message need to be rephrased #918749
- spicec does not pass cert_file #953582
- Error in "update network --cluster-identifier --usages-usage" #950993
- List/Show suggests parent+child as single param #950398
- Error type "brick" does not exist." on replace brick #923196
- Implement Session-TTL header support #928314
- unclear error message when using unsupported 2 levels attribute #949642
- correlation_id is not attached to update command #950441
- connect --help will log the user out of the disconnected cli #890340
- "help add" fails to format the error when number of provided args in 
incorrect #922018



More details can be found at [1].

[1] http://wiki.ovirt.org/Cli-changelog



-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-python 3.3.0.2-1 released

2013-05-01 Thread Michael Pasternak

 - in ClusterGlusterVolumeBricks fixed add() parameters
 - to StorageDomainVM.delete() added async parameter
 - fixed parent tag parameter in the tags.add()/.update() methods
 - nic.network is no longer mandatory parameter for vnic creation
 - Implement Session-TTL header support #928313
 - refactor invocation flow #949189, #949187
 - user should not see admin permissions the DC #924357


More details can be found at [1].

[1] http://wiki.ovirt.org/Python-sdk-changelog


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] [oss-security] CVE-2012-XXYY Request -- google-authenticator: Information disclosure due insecure requirement on the secrets file

2013-04-18 Thread Michael Pasternak

FYI

On 04/18/2013 01:45 PM, Jan Lieskovsky wrote:
> Hello Kurt, Steve, Alexander, vendors,
> 
>   as noted in [1]:
> 
> An information disclosure file was found in the way google-authenticator,
> a pluggable authentication module (PAM) which allows login using one-time
> passcodes conforming to the open standards developed by the Initiative for
> Open Authentication (OATH), performed management of its secret / state file
> in certain configurations. Due the lack of 'user=' option the secret file
> was previously required to be user-readable, allowing (in certain cases)
> a local attacker to obtain the (pre)shared client-to-authentication-server
> secret, possibly leading to victim's account impersonation.
> 
> A different vulnerability than CVE-2013-0258.
> 
> References:
> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666129
> [2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666129#10
> [3] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666129#20
> [4] https://bugzilla.redhat.com/show_bug.cgi?id=953505
> 
> Relevant upstream patch:
> [5] 
> https://code.google.com/p/google-authenticator/source/detail?r=c3414e9857ad64e52283f3266065ef3023fc69a8
> 
> @Alexander - since I am not sure I have described the attack vector above
>  properly, please correct me if / where required.
> 
> @Kurt * the CVE-2012- identifier should be allocated to this issue, since
> the security implications of this problem are for the first time
> mentioned here: 
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=666129#10 (2012-09-22),
> 
>   * from what I have looked, there doesn't seem to be:
>   http://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=authenticator
> 
> a CVE identifier allocated to this issue yet (as noted above
> CVE-2013-0258 from that list is different issue).
> 
> => could you allocate one?
> 
> Thank you && Regards, Jan.
> --
> Jan iankko Lieskovsky / Red Hat Security Response Team


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] api question / create vm from template

2013-04-09 Thread Michael Pasternak

Hi Alex,

On 04/04/2013 10:40 PM, Alex Leonhardt wrote:
> and via the python api ?

- to clone vm from template in python sdk do:

vm_params_holder = params.VM(disks=params.Disks(clone=True), ...)
api.vms.add(vm_params_holder)

- to create vm with pre-allocated disk/s, you can modify disk/s config
during creation of vm by:

template = api.templates.get(name="xxx")
template_disks = template.disks.list()

for disk in template_disks:
#modify disk config here

vm_params_holder = params.VM(disks=params.Disks(disk=template_disks))
api.vms.add(vm_params_holder)

> 
> On 04/04/2013 12:41 PM, Dafna Ron wrote:
>> Resource allocation tab will allow you to choose between thin provision and 
>> clone.
>>
>>
>> On 04/04/2013 01:03 PM, Alex Leonhardt wrote:
>>> hi,
>>>
>>> i've been successful in creating a VM from a template, however, that VM is 
>>> a thin-provisioned one ? is it possible to make it a cloned / 
>>> pre-provisioned ? otherwise i
>>> wont be able to update/remove the template when i need to ?
>>>
>>> this is on ovirt 3.1
>>>
>>> thanks
>>> alex
>>>
>>> -- 
>>> | RHCE | Sen Sys Engineer / Platform Architect | www.vcore.co 
>>> <http://www.vcore.co> | www.vsearchcloud.com <http://www.vsearchcloud.com> |
>>>
>>>
>>> ___
>>> Users mailing list
>>> Users@ovirt.org
>>> http://lists.ovirt.org/mailman/listinfo/users
>>
>>
> 
> 
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Query regarding storagedomins

2013-04-07 Thread Michael Pasternak

Right, links in sdk entities are used only for convenient tracking of objects 
in api,
sdk itself abstracts HTTP internals, and expose decorators for 
collections/entities
where every collection decorator has list()/get()/add()/etc. methods for 
listing/querying/creating
objects and entity's decorator has methods like update()/delete()/actions etc.

On 04/05/2013 08:00 AM, Romil Gupta wrote:
> Hi ,
> 
> Here is the sample code :
> 
> sd =api.datacenters.get(id = datacenter_id).storagedomains.list()
>   for s in sd:
>   if(s.get_master()):
>   disk_used =s.get_used() / (1024*1024*1024)
>   disk_available = s.get_available() / (1024*1024*1024)
>   print disk_used
>   print disk_available
> 
> 
> On Fri, Apr 5, 2013 at 2:04 AM, Gianluca Cecchi  <mailto:gianluca.cec...@gmail.com>> wrote:
> 
> On Thu, Apr 4, 2013 at 9:35 PM, Romil Gupta wrote:
> > I solved it by myself , pls ignore this mail :)
> 
> Would you like to share it?
> Thanks,
> Gianluca
> 
> 
> 
> 
> -- 
> *Thanks & Regards,*
> *Romil Gupta
> M.Tech (CSE), Manipal
> Intern@ HP ISO,Bangalore
> Contact No. : 8880414133*


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-java 1.0.0.6-1 released

2013-04-04 Thread Michael Pasternak
- added new collection ClusterGlusterVolumeGlusterBrickStatistics
- added new properties to the GlusterBrick
- to vm added cpu.mode
- to host install action added "image" parameter
- ignore case in factory method lookup

More details can be found at [1].

[1] http://www.ovirt.org/Java-sdk-changelog


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] About Ovirt Java SDK Question

2013-04-04 Thread Michael Pasternak
Hi,

On 04/03/2013 12:55 PM, 田德富 wrote:
> *hi,*
> ** 
> *  The "*Ovirt Java SDK" *whether to support Android?*
> *  if support, how to do.*
> ** 
> *  thanks.*
> **

At the moment Java-SDK is not supported on Android, as Android dalvik VM
does not support javax which is SDK core infrastructure.
-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] 答复: 答复: about python sdk

2013-04-04 Thread Michael Pasternak

what error do you see?

On 04/03/2013 03:48 AM, leaboy@126 wrote:
> 3.1
> 
> -邮件原件-
> 发件人: Michael Pasternak [mailto:mpast...@redhat.com] 
> 发送时间: 2013年4月2日 18:43
> 收件人: leaboy@126
> 抄送: users@ovirt.org
> 主题: Re: 答复: about python sdk
> 
> On 04/02/2013 01:07 PM, leaboy@126 wrote:
>> I'm sorry, the problem is still exist. There is only admin@internal can
>> login, the user(UserRole) added in my domain can't 
>> login. When I changed it's role to UserpUser, it can login well.
>> PS: I have get the latest sdk and assigned the 'filter' True.
> 
> what is the version of your backend?
> 
>>
>> -邮件原件-
>> 发件人: Michael Pasternak [mailto:mpast...@redhat.com] 
>> 发送时间: 2013年4月2日 17:04
>> 收件人: leaboy@126
>> 抄送: users@ovirt.org
>> 主题: Re: about python sdk
>>
>> On 04/02/2013 11:21 AM, leaboy@126 wrote:
>>> Hello:
>>>
>>>  When I use samples-portals to connect to overt-engine, I find
>> only super-user can login,
>>>
>>> And other user role can’t. So I don’t know whether overt-sdk doesn’t
>> support other user role ,
>>>
>>> or some error in my test Environment.
>>>
>>>  
>>>
>>>  When I login http://localhost:8700/api, here is super-user too.
>>>
>>
>> please use latest sdk and make sure 'filter' argument in the sdk
>> constructor is set to 'True' if you wish using non-sdmin api.
>>
> 
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Using ovirt-shell as a regular user

2013-04-02 Thread Michael Pasternak
On 04/02/2013 03:17 PM, Vincent Van der Kussen wrote:
> On Tue, Apr 02, 2013 at 03:33:49PM +0300, Michael Pasternak wrote:
>> On 04/02/2013 02:48 PM, Vincent Van der Kussen wrote:
>>> On Tue, Apr 02, 2013 at 02:51:03PM +0300, Michael Pasternak wrote:
>>>>
>>>> what error did you see when trying to use shell (as non-privileged user)?
>>>>
>>>> On 04/02/2013 02:13 PM, Vincent Van der Kussen wrote:
>>>>> On Tue, Apr 02, 2013 at 02:08:36PM +0300, Michael Pasternak wrote:
>>>>>>
>>>>>> Hi Vincent,
>>>>>>
>>>>>> how did you installed ovirt-shell?
>>>
>>> No real error, just an empty page with END
>>
>> you mean that you could access the shell, but commands execution has failed,
>> or an empty page when you trying to run the shell?
>>
> 
> I get an empty page. I also see no log of a user being logged in on the ovirt 
> mgmt interface

if you talking about running commands in shell and getting no response,
it could happen if you trying connect to SSL secured site using HTTP protocol 
(instead of HTTPS),
but latest sdk/cli protect against this flow, please upgrade to the latest 
artifacts.

> 
>>>
>>>>>>
>>>>>> On 04/02/2013 01:37 PM, Vincent Van der Kussen wrote:
>>>>>>> Hi, 
>>>>>>>
>>>>>>> I just found out that you cannot use the ovirt-shell as a regular 
>>>>>>> (mortal) user. I can access the shell from the root account or if I 
>>>>>>> give the user sudo rights to do so.
>>>>>>>
>>>>>>> I didn't find anything in the documentation about this so i would like 
>>>>>>> to know if this is normal behaviour?
>>>>>>>
>>>>>>> also posted this here : 
>>>>>>> https://access.redhat.com/discussion/use-rhevm-shell-mortal-user
>>>>>>>
>>>>>
>>>>> Installed it from the yum repository on F18
>>>>>
>>>>>> -- 
>>>>>>
>>>>>> Michael Pasternak
>>>>>> RedHat, ENG-Virtualization R&D
>>>>
>>>>
>>>> -- 
>>>>
>>>> Michael Pasternak
>>>> RedHat, ENG-Virtualization R&D
>>
>>
>> -- 
>>
>> Michael Pasternak
>> RedHat, ENG-Virtualization R&D


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-cli 3.3.0.1 released

2013-04-02 Thread Michael Pasternak

- at vm.start() --vm-os-boot doesn't send the order of devices #921464
- rephrase status command help
- add option to retrieve system summary #854369
- accept IP address as FQ argument rather than string #886067
- fix broken pipe
- Bad error message when trying to create a new Role #908284
- add flag --dont-validate-cert-chain #915231
- collection-based-options could be passed in 2 ways #859684
- make NO_SUCH_ACTION error a bit more clear
- ovirt-cli DistributionNotFound exception on f18 #881011
- ovirt-shell misleading help for command "connect" #907943
- show event -id accept strings instead of numeric values #886786
- Use vncviewer passwordFile instead of passwdInput

More details can be found at [1].

[1] http://wiki.ovirt.org/Cli-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-sdk-python 3.3.0.1 released

2013-04-02 Thread Michael Pasternak

 - added new collection ClusterGlusterVolumeBrickStatistics
 - added NetUp 'cloned disk' importing capabilities
 - to ClusterGlusterVolumeBricks.list() added new argument "all_content"
 - to ClusterGlusterVolumeBricks.get() added new argument "all_content"
 - to host install method added new parameter "image"
 - to host add method added new parameter "display.address"
 - to vm add method added new parameter "vm.cpu.mode"
 - to vm add method added new overload for creating vm from snapshot
 - to cluster added tunnel_migration
 - to display added keyboard_layout
 - to display added smartcard_enabled
 - to DataCenter added Clusters sub-collection
 - to StorageDomain added Disks sub-collection
 - to Disks.list() added 'unregistered' argument
 - to Host added display.address
 - to Snapshot added commit/preview/undo actions
 - to vms.add() added overload for creating vm from snapshot
 - to hosts.add() added [@param host.display.address: string]
 - to vm.ticket() added [@param action.ticket.value: string]
 - return error if amount of fetched objects in X.get() is > 1 #890327
 - session based authentication for /localhost is broken #916285
 - explicitly ask for reply in xml
 - Add constructor parameter validate_cert_chain=True #915225
 - defend against malformed server reply


For more details see [1].

[1] http://wiki.ovirt.org/Python-sdk-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D

___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Using ovirt-shell as a regular user

2013-04-02 Thread Michael Pasternak
On 04/02/2013 02:48 PM, Vincent Van der Kussen wrote:
> On Tue, Apr 02, 2013 at 02:51:03PM +0300, Michael Pasternak wrote:
>>
>> what error did you see when trying to use shell (as non-privileged user)?
>>
>> On 04/02/2013 02:13 PM, Vincent Van der Kussen wrote:
>>> On Tue, Apr 02, 2013 at 02:08:36PM +0300, Michael Pasternak wrote:
>>>>
>>>> Hi Vincent,
>>>>
>>>> how did you installed ovirt-shell?
> 
> No real error, just an empty page with END

you mean that you could access the shell, but commands execution has failed,
or an empty page when you trying to run the shell?

> 
>>>>
>>>> On 04/02/2013 01:37 PM, Vincent Van der Kussen wrote:
>>>>> Hi, 
>>>>>
>>>>> I just found out that you cannot use the ovirt-shell as a regular 
>>>>> (mortal) user. I can access the shell from the root account or if I give 
>>>>> the user sudo rights to do so.
>>>>>
>>>>> I didn't find anything in the documentation about this so i would like to 
>>>>> know if this is normal behaviour?
>>>>>
>>>>> also posted this here : 
>>>>> https://access.redhat.com/discussion/use-rhevm-shell-mortal-user
>>>>>
>>>
>>> Installed it from the yum repository on F18
>>>
>>>> -- 
>>>>
>>>> Michael Pasternak
>>>> RedHat, ENG-Virtualization R&D
>>
>>
>> -- 
>>
>> Michael Pasternak
>> RedHat, ENG-Virtualization R&D


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Using ovirt-shell as a regular user

2013-04-02 Thread Michael Pasternak

what error did you see when trying to use shell (as non-privileged user)?

On 04/02/2013 02:13 PM, Vincent Van der Kussen wrote:
> On Tue, Apr 02, 2013 at 02:08:36PM +0300, Michael Pasternak wrote:
>>
>> Hi Vincent,
>>
>> how did you installed ovirt-shell?
>>
>> On 04/02/2013 01:37 PM, Vincent Van der Kussen wrote:
>>> Hi, 
>>>
>>> I just found out that you cannot use the ovirt-shell as a regular (mortal) 
>>> user. I can access the shell from the root account or if I give the user 
>>> sudo rights to do so.
>>>
>>> I didn't find anything in the documentation about this so i would like to 
>>> know if this is normal behaviour?
>>>
>>> also posted this here : 
>>> https://access.redhat.com/discussion/use-rhevm-shell-mortal-user
>>>
> 
> Installed it from the yum repository on F18
> 
>> -- 
>>
>> Michael Pasternak
>> RedHat, ENG-Virtualization R&D


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Using ovirt-shell as a regular user

2013-04-02 Thread Michael Pasternak

Hi Vincent,

how did you installed ovirt-shell?

On 04/02/2013 01:37 PM, Vincent Van der Kussen wrote:
> Hi, 
> 
> I just found out that you cannot use the ovirt-shell as a regular (mortal) 
> user. I can access the shell from the root account or if I give the user sudo 
> rights to do so.
> 
> I didn't find anything in the documentation about this so i would like to 
> know if this is normal behaviour?
> 
> also posted this here : 
> https://access.redhat.com/discussion/use-rhevm-shell-mortal-user
> 
> Regards,
> Vincent
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] 答复: about python sdk

2013-04-02 Thread Michael Pasternak
On 04/02/2013 01:07 PM, leaboy@126 wrote:
> I'm sorry, the problem is still exist. There is only admin@internal can
> login, the user(UserRole) added in my domain can't 
> login. When I changed it's role to UserpUser, it can login well.
> PS: I have get the latest sdk and assigned the 'filter' True.

what is the version of your backend?

> 
> -邮件原件-
> 发件人: Michael Pasternak [mailto:mpast...@redhat.com] 
> 发送时间: 2013年4月2日 17:04
> 收件人: leaboy@126
> 抄送: users@ovirt.org
> 主题: Re: about python sdk
> 
> On 04/02/2013 11:21 AM, leaboy@126 wrote:
>> Hello:
>>
>>  When I use samples-portals to connect to overt-engine, I find
> only super-user can login,
>>
>> And other user role can’t. So I don’t know whether overt-sdk doesn’t
> support other user role ,
>>
>> or some error in my test Environment.
>>
>>  
>>
>>  When I login http://localhost:8700/api, here is super-user too.
>>
> 
> please use latest sdk and make sure 'filter' argument in the sdk
> constructor is set to 'True' if you wish using non-sdmin api.
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] about python sdk

2013-04-02 Thread Michael Pasternak
On 04/02/2013 11:21 AM, leaboy@126 wrote:
> Hello:
> 
>  When I use samples-portals to connect to overt-engine, I find only 
> super-user can login,
> 
> And other user role can’t. So I don’t know whether overt-sdk doesn’t support 
> other user role ,
> 
> or some error in my test Environment.
> 
>  
> 
>  When I login http://localhost:8700/api, here is super-user too.
> 

please use latest sdk and make sure 'filter' argument in the sdk
constructor is set to 'True' if you wish using non-sdmin api.

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Configure spice plugin for wan

2013-03-24 Thread Michael Pasternak
On 03/16/2013 11:20 PM, Itamar Heim wrote:
> On 03/15/2013 07:50 PM, René Koch wrote:
>>
>> -Original message-
>>> From:Gianluca Cecchi 
>>> Sent: Friday 15th March 2013 18:30
>>> To: Itamar Heim 
>>> Cc: users 
>>> Subject: Re: [Users] Configure spice plugin for wan
>>>
>>> On Fri, Mar 15, 2013 at 11:02 AM, Itamar Heim  wrote:
>>>> On 03/07/2013 08:00 AM, Gianluca Cecchi wrote:
>>>>>
>>>>> On Thu, Mar 7, 2013 at 6:58 AM, Gianluca Cecchi
>>>
>>>>
>>>> was this resolved?
>>>> you've mentioned above you are using 'rhev-agent' - ovirt may be checking
>>>> for ovirt-guest-agent'...
>>>> please send list of installed applications as reported by the guest agent
>>>> (restapi probably easiest).
>>>
>>> No, only a few lines shown for applications and no wan option shown in
>>> user portal...
>>> I "compiled" ovirt-guest-agent service for windows XP and Windows7
>>> A quick command line example of using rest/api to get applications?
>>
>>
>> Applications aren't accessible using REST-API.
>> But it would be great if this would be added as a feature in 3.3... :)
> 
> interesting. michael - any reason for this?

the overhead of sending a bulk of applications when listing vms at /vms,
but this can be implemented as emulated sub-collection under vm (as we did
for /cdroms), i've filed [1] for this.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=926928

> as a workaround, command line can be done at host level via vdsClient -s 0 
> getAllVmStats


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Obtaining running tasks via API

2013-03-13 Thread Michael Pasternak
Hi Kuba,

I believe you're referring to the executing "tasks" and not to the async tasks,
this feature is yet not exposed via api,

async tasks however, exist in api and returned in action response when it's
executed in the async mode.

On 03/13/2013 05:45 PM, Jakub Libosvar wrote:
> Hi all,
> 
> is there a way how I could obtain async tasks via REST-API? Something similar 
> to Tasks tab at the bottom pane in webadmin.
> 
> Thank you for answers,
> Kuba
> ___
> Users mailing list
> Users@ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Adding external events to oVirt

2013-03-10 Thread Michael Pasternak

Thanks Ofri,

Eli, please update feature page.

On 03/10/2013 03:57 PM, Ofri Masad wrote:
> Not sure if this will help but it seems that the current API calls for a 
> different syntax:
> 
>  was changed to 
>  was changed to 
> 
> see if this helps
> Ofri
> 
> - Original Message - 
> 
>> From: "satheesh hegde" 
>> To: users@ovirt.org
>> Sent: Thursday, March 7, 2013 6:36:25 PM
>> Subject: [Users] Adding external events to oVirt
> 
>> Hi,
> 
>> I tried exploring the feature of adding external events in oVirt. (
>> Version 3.2 )
>> I just wrote a JavaScript to fetch events and it wroked fine.( GET
>> operation to URL http:///api/events ).
> 
>> But when tried with POST operation, to add my own events, it threw "
>> error 405 Method not allowed ". (URL http:///api/events ).
>> (The html file is not included in any plugin code, its standalone
>> file).
>> (The data I passed is as specified in link: "
>> http://www.ovirt.org/Features/Design/DetailedExternalEvents";).
> 
>> What went wrong? Is it not supported on oVirt3.2 or the URL is
>> incorrect?
> 
>> Regards
>> Satheesh J
>> ___
>> Users mailing list
>> Users@ovirt.org
>> http://lists.ovirt.org/mailman/listinfo/users


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Improvement for the oVirt java sdk

2013-03-08 Thread Michael Pasternak
On 03/07/2013 04:53 PM, Morrissey, Christopher wrote:
> 
> -Chris
> 
>> -Original Message-
>> From: Michael Pasternak [mailto:mpast...@redhat.com]
>> Sent: Thursday, March 07, 2013 6:37 AM
>> To: Morrissey, Christopher
>> Cc: users@ovirt.org; engine-devel
>> Subject: Re: Improvement for the oVirt java sdk
>>
>> On 03/04/2013 05:26 PM, Morrissey, Christopher wrote:
>>> Hi Michael,
>>>
>>> Yes, that is the case here. I'm getting the JSESSIONID from the client
>>> and passing it to our server so that it can perform REST-API calls back to
>> oVirt under the logged in user's authenticated session.
>>
>> done, see http://lists.ovirt.org/pipermail/users/2013-March/012969.html
> 
> Thanks for the very quick implementation! I'll give it a try shortly.

here [1] is wiki for this change.

[1] http://www.ovirt.org/Java-sdk#Authenticating_using_sessionid

> 
>>
>>>
>>> -Chris
>>>
>>>> -Original Message-
>>>> From: Michael Pasternak [mailto:mpast...@redhat.com]
>>>> Sent: Sunday, March 03, 2013 4:44 AM
>>>> To: Morrissey, Christopher
>>>> Cc: users@ovirt.org; engine-devel
>>>> Subject: Re: Improvement for the oVirt java sdk
>>>>
>>>>
>>>> Hi Christopher,
>>>>
>>>> In general SDK abstracts the transport layer, therefore all
>>>> authentication internals hidden from the user,
>>>>
>>>> i.e SESSION based authentication happens implicitly (by default),
>>>> when you initiate SDK entry point,
>>>>
>>>> the story is different if you want using SSO-like login by reusing
>>>> JSESSIONID from the REST-API for instance, and i can support such
>>>> scenario,
>>>>
>>>> but, is this your case?
>>>>
>>>> On 02/28/2013 10:04 PM, Morrissey, Christopher wrote:
>>>>> Hi Michael,
>>>>>
>>>>> I'm looking to use the oVirt java sdk for connecting into oVirt from
>>>>> our server. However, we have a UI plugin that gets access to a
>>>>> session ID that we should be able to use to connect through the REST
>>>>> API instead of the username and password. Any chance the sdk could
>>>>> be
>>>> updated to take the session ID and create a connection vs. a user
>>>> name and password?
>>>>>
>>>>> -Chris
>>>>>
>>>>> Chris Morrissey
>>>>> Software Engineer
>>>>> NetApp Inc.
>>>>> 919.476.4428
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Michael Pasternak
>>>> RedHat, ENG-Virtualization R&D
>>
>>
>> --
>>
>> Michael Pasternak
>> RedHat, ENG-Virtualization R&D


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Improvement for the oVirt java sdk

2013-03-07 Thread Michael Pasternak
On 03/04/2013 05:26 PM, Morrissey, Christopher wrote:
> Hi Michael,
> 
> Yes, that is the case here. I'm getting the JSESSIONID from the client and 
> passing it to our server 
> so that it can perform REST-API calls back to oVirt under the logged in 
> user's authenticated session.

done, see http://lists.ovirt.org/pipermail/users/2013-March/012969.html

> 
> -Chris
> 
>> -Original Message-
>> From: Michael Pasternak [mailto:mpast...@redhat.com]
>> Sent: Sunday, March 03, 2013 4:44 AM
>> To: Morrissey, Christopher
>> Cc: users@ovirt.org; engine-devel
>> Subject: Re: Improvement for the oVirt java sdk
>>
>>
>> Hi Christopher,
>>
>> In general SDK abstracts the transport layer, therefore all authentication
>> internals hidden from the user,
>>
>> i.e SESSION based authentication happens implicitly (by default), when you
>> initiate SDK entry point,
>>
>> the story is different if you want using SSO-like login by reusing JSESSIONID
>> from the REST-API for instance, and i can support such scenario,
>>
>> but, is this your case?
>>
>> On 02/28/2013 10:04 PM, Morrissey, Christopher wrote:
>>> Hi Michael,
>>>
>>> I'm looking to use the oVirt java sdk for connecting into oVirt from
>>> our server. However, we have a UI plugin that gets access to a session
>>> ID that we should be able to use to connect through the REST API
>>> instead of the username and password. Any chance the sdk could be
>> updated to take the session ID and create a connection vs. a user name and
>> password?
>>>
>>> -Chris
>>>
>>> Chris Morrissey
>>> Software Engineer
>>> NetApp Inc.
>>> 919.476.4428
>>>
>>>
>>
>>
>> --
>>
>> Michael Pasternak
>> RedHat, ENG-Virtualization R&D


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-java 1.0.0.5-1 released

2013-03-07 Thread Michael Pasternak

- use explicit classloader for JAXBContext
- implement support for (user defined) session authentication
- implement generic JAXBElement generation
- to DataCenterStorageDomain added Disks sub-collection
- to StorageDomain added Disks sub-collection
- to host added display.address property
- to vms.add() added overload for creating vm from snapshot



More details can be found at [1].

[1] http://www.ovirt.org/Java-sdk-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Rest-api to fetch the hosts details ( active vm's , CPU , Physical memory etc.)

2013-03-04 Thread Michael Pasternak
On 03/04/2013 03:43 PM, Romil Gupta wrote:
> Hi Michael ,
> 
> May I know , Is there any api to get the no. of cores available in  Host 
> attached to a Cluster in RHEV-M ??

see in host CPU element:


  
  ...


api.hosts.get(name="...").get_cpu().get_topology().get_cores()

> 
> Thanks 
> Romil


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Rest-api to fetch the hosts details ( active vm's , CPU , Physical memory etc.)

2013-03-03 Thread Michael Pasternak

Hi Romil,

Not sure i understand, are you talking about quota resources allocation?

On 03/01/2013 11:03 AM, Romil Gupta wrote:
> Hi ..thanks for continuous help :)
> 
> I have a query is their any way we can check how much Cores remaining in a 
> cluster in Rhev-m  before provisioning a VM ?
> 
> coz after creating 5-10 VM's in a cluster if we create new VM then it shows 
> exception like Cluster doesnt contains cores!
> 
> Thanks .
> Romil
> 
> 
> 
> 
> On Tue, Feb 19, 2013 at 3:56 PM, Michael Pasternak  <mailto:mpast...@redhat.com>> wrote:
> 
> 
> Hi Romil,
> 
> On 02/19/2013 11:22 AM, Romil Gupta wrote:
> > Hi Michael ,
> >
> >
> > Thanks for ur continuous help. I have one more query here 
> >
> > I want to fetch  the host elements like ..
> > Type
> > address
> > status
> > No. of CPUs
> > cpu->type
> > cpu -> name->topology->cores->sockets
> > memory
> > summary
> > version
> >
> > Is is the correct way of doing to get these details?
> >
> > hosts=api.hosts.list()
> > for host in hosts:
> > type=api.hosts.get(host.id <http://host.id> <http://host.id>).type
> > address=api.hosts.get(host.id <http://host.id> 
> <http://host.id>).address
> 
> no, please use getter methods instead as they're encapsulating attributes 
> that may be
> called differently in python,
> 
> for instance 'type' attribute in python renamed to 'type_' cause 'type' 
> is preserved name.
> 
> you can see all available get_X() methods by running code bellow:
> 
> #> print [token for token in type(host.superclass).__dict__.keys() if 
> token.startswith('get_')]
> 
> >
> > I got some exception :
> >  address=api.hosts.get(host.id <http://host.id> 
> <http://host.id>).get_address()
> > AttributeError: 'NoneType' object has no attribute 'get_address'
> 
> this can only happen if your host lookup has failed.
> 
> >
> >
> > Please suggest me the correct way of doing it if have referred
> > 
> https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Virtualization/3.1/html/Developer_Guide/chap-REST_API_Guide-Hosts.html
> >
> > Regards,
> > Romil
> >
> >
> >
> >
> >
> >
> > On Wed, Jan 30, 2013 at 6:50 PM, Michael Pasternak  <mailto:mpast...@redhat.com> <mailto:mpast...@redhat.com 
> <mailto:mpast...@redhat.com>>> wrote:
> >
> > On 01/30/2013 03:09 PM, Romil Gupta wrote:
> > > thanks for all your guidance , now I m able to fetch the details 
> of a host using
> > > the below script :
> > >
> > > hosts=api.hosts.list()
> > > for host in hosts:
> > > print "host name--> %s  id--->> %s \n"%(host.name 
> <http://host.name> <http://host.name> <http://host.name> , host.id 
> <http://host.id> <http://host.id>
> <http://host.id>)
> > > clusterid=api.hosts.get(host.name <http://host.name> 
> <http://host.name> <http://host.name>).cluster.id <http://cluster.id> 
> <http://cluster.id>
> <http://cluster.id>
> > > print clusterid
> > >
> > > hostname=api.hosts.get(host.name <http://host.name> 
> <http://host.name> <http://host.name>)
> > > statistic=hostname.statistics.list()
> > > i=0
> > > while i < 14:
> > > print statistic[i].name
> > > print statistic[i].description
> > > print statistic[i].unit
> > > print statistic[i].values.value[0].datum
> > > i=i+1;
> > >
> > >
> >     > summary=api.get_summary()
> > > print summary
> > >
> > > How I can print the summary , its only return the Object??
> >
> > this is summary object structure:
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  

Re: [Users] Improvement for the oVirt java sdk

2013-03-03 Thread Michael Pasternak

Hi Christopher,

In general SDK abstracts the transport layer, therefore all authentication
internals hidden from the user,

i.e SESSION based authentication happens implicitly (by default), when you
initiate SDK entry point,

the story is different if you want using SSO-like login by reusing JSESSIONID
from the REST-API for instance, and i can support such scenario,

but, is this your case?

On 02/28/2013 10:04 PM, Morrissey, Christopher wrote:
> Hi Michael,
> 
> I'm looking to use the oVirt java sdk for connecting into oVirt from our 
> server. However, 
> we have a UI plugin that gets access to a session ID that we should be able 
> to use to connect through
> the REST API instead of the username and password. Any chance the sdk could 
> be updated to take the session
> ID and create a connection vs. a user name and password?
> 
> -Chris
> 
> Chris Morrissey
> Software Engineer
> NetApp Inc.
> 919.476.4428
> 
> 


-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-java 1.0.0.4-1 released

2013-02-25 Thread Michael Pasternak
- implement SSL support (without host verification)
- implement shutdown() to deallocate system resources
- to cluster added tunnel_migration property
- to DataCenter added Clusters sub-collection
- to root collection resource Disk added Permissions sub-collectio
- to root collection resource Disk added Statistic sub-collection
- host can be attached to cluster now either by id or name
- to StorageDomainTemplate added Disks sub-collection
- to StorageDomainVM added Disks sub-collection
- to template.display added keyboard_layout property
- to template added tunnel_migration property
- to vm.display added keyboard_layout property
- to vm added tunnel_migration property
- to VMSnapshot added preview method
- to VMSnapshot added undo method
- to VMSnapshot added commit method


More details can be found at [1].

[1] http://www.ovirt.org/Java-sdk-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


[Users] ovirt-engine-sdk-java 1.0.0.3-1 released

2013-02-25 Thread Michael Pasternak

* Wed  Jan 30 2013 Michael Pasternak  - 1.0.0.3-1
- implement SSL support (without host verification)
- implement shutdown() to deallocate system resources
- to cluster added tunnel_migration property
- to DataCenter added Clusters sub-collection
- to root collection resource Disk added Permissions sub-collectio
- to root collection resource Disk added Statistic sub-collection
- host can be attached to cluster now either by id or name
- to StorageDomainTemplate added Disks sub-collection
- to StorageDomainVM added Disks sub-collection
- to template.display added keyboard_layout property
- to template added tunnel_migration property
- to vm.display added keyboard_layout property
- to vm added tunnel_migration property
- to VMSnapshot added preview method
- to VMSnapshot added undo method
- to VMSnapshot added commit method


More details can be found at [1].

[1] http://www.ovirt.org/Java-sdk-changelog

-- 

Michael Pasternak
RedHat, ENG-Virtualization R&D
___
Users mailing list
Users@ovirt.org
http://lists.ovirt.org/mailman/listinfo/users


Re: [Users] Rest-api to fetch the hosts details ( active vm's , CPU , Physical memory etc.)

2013-02-19 Thread Michael Pasternak

Hi Romil,

On 02/19/2013 11:22 AM, Romil Gupta wrote:
> Hi Michael ,
> 
> 
> Thanks for ur continuous help. I have one more query here 
> 
> I want to fetch  the host elements like ..
> Type 
> address 
> status
> No. of CPUs
> cpu->type
> cpu -> name->topology->cores->sockets 
> memory 
> summary 
> version
> 
> Is is the correct way of doing to get these details?
> 
> hosts=api.hosts.list()
> for host in hosts:
> type=api.hosts.get(host.id <http://host.id>).type
> address=api.hosts.get(host.id <http://host.id>).address

no, please use getter methods instead as they're encapsulating attributes that 
may be
called differently in python,

for instance 'type' attribute in python renamed to 'type_' cause 'type' is 
preserved name.

you can see all available get_X() methods by running code bellow:

#> print [token for token in type(host.superclass).__dict__.keys() if 
token.startswith('get_')]

> 
> I got some exception :
>  address=api.hosts.get(host.id <http://host.id>).get_address()
> AttributeError: 'NoneType' object has no attribute 'get_address'

this can only happen if your host lookup has failed.

> 
> 
> Please suggest me the correct way of doing it if have referred 
> https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Virtualization/3.1/html/Developer_Guide/chap-REST_API_Guide-Hosts.html
> 
> Regards,
> Romil
> 
> 
> 
> 
> 
> 
> On Wed, Jan 30, 2013 at 6:50 PM, Michael Pasternak  <mailto:mpast...@redhat.com>> wrote:
> 
> On 01/30/2013 03:09 PM, Romil Gupta wrote:
> > thanks for all your guidance , now I m able to fetch the details of a 
> host using
> > the below script :
> >
> > hosts=api.hosts.list()
> > for host in hosts:
> > print "host name--> %s  id--->> %s \n"%(host.name 
> <http://host.name> <http://host.name> , host.id <http://host.id> 
> <http://host.id>)
> > clusterid=api.hosts.get(host.name <http://host.name> 
> <http://host.name>).cluster.id <http://cluster.id> <http://cluster.id>
> > print clusterid
> >
> > hostname=api.hosts.get(host.name <http://host.name> 
> <http://host.name>)
> > statistic=hostname.statistics.list()
> > i=0
> > while i < 14:
> > print statistic[i].name
> > print statistic[i].description
> > print statistic[i].unit
> > print statistic[i].values.value[0].datum
> > i=i+1;
> >
> >
> > summary=api.get_summary()
> > print summary
> >
> > How I can print the summary , its only return the Object??
> 
> this is summary object structure:
> 
>     
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> you can access properties directly, like this:
> summary.hosts.active
> 
> >
> > Thanks,
> > Romil
> >
> >
> > On Wed, Jan 30, 2013 at 4:52 PM, Michael Pasternak  <mailto:mpast...@redhat.com> <mailto:mpast...@redhat.com 
> <mailto:mpast...@redhat.com>>> wrote:
> >
> >
> > Romil,
> >
> > On 01/30/2013 12:18 PM, Romil Gupta wrote:
> > > Hi,
> > >
> > > Is this is a right way to get it ??
> > >
> > > statistics=params.Host(host.name <http://host.name> 
> <http://host.name> <http://host.name>).get_statistic()
> >
> > 1. first you need to fetch the host to see it's statistics (by 
> doing params.Host(...) you creating
> >host parameters holder which is needed for adding new host to 
> the system)
> >
> > 2. get_x() getters used to access object attributes, while 
> collections are exposed as properties, do
> >
> > 1. myhost = api.hosts.get(name="xxx")
> > 2. myhost.statistics.list()
> > 3. loop over returned collection of statistics to find what you're 
> looking for
> >
>     > - note, statistic objects are complex types, you can look for data 
> at:
> >
> &

  1   2   3   >