[ovirt-users] Details of the host

Juan Hernández jhernand at redhat.com
Mon Jan 26 09:02:01 UTC 2015


On 01/24/2015 03:31 PM, ChandraShekar Shastri wrote:
> Thanks Juan,
> 
> Can I login into the ovirt-engine url using the encrypted password. If
> it is possible what are the encryption method that it allows.
> 
> Please share the code if you have it handy.
> 
> Thanks,
> Chandrashekar
> 

The Python SDK only supports "Basic" authentication. Version 3.6 will
also support Kerberos authentication. There are no plans at the moment
to support any other authentication mechanism in the Python SDK.

> On Fri, Jan 23, 2015 at 1:46 PM, Juan Hernández <jhernand at redhat.com
> <mailto:jhernand at redhat.com>> wrote:
> 
>     On 01/21/2015 02:27 PM, ChandraShekar Shastri wrote:
>     > Hi All,
>     >
>     > I want to get the details of the Host without activating is there
>     a way
>     > to do it.
>     > I want to query the RHEV-Manager and would like to get the details of
>     > MAC address without activating it.
>     >
>     > Do you have the script to do this.
>     >
>     > Thanks,
>     > Chandrashekar
>     >
> 
>     Assuming that the host has already been added to the system then you can
>     get the details with a Python script like this:
> 
>     #!/usr/bin/python
> 
>     from ovirtsdk.api import API
>     from ovirtsdk.xml import params
> 
>     api = API(
>       url='https://ovirt.example.com/ovirt-engine/api',
>       username='admin at internal',
>       password='******',
>       insecure=True
>     )
> 
>     host = api.hosts.get(name="myhost")
>     nics = host.nics.list()
>     for nic in nics:
>         print("%s: %s" % (nic.get_name(), nic.get_mac().get_address()))
> 
>     api.disconnect()
> 
>     This will print something like this:
> 
>     eth0: 52:54:00:9d:a7:26
> 
>     If the host hasn't been added you can add it, without activating it:
> 
>     #!/usr/bin/python
> 
>     from ovirtsdk.api import API
>     from ovirtsdk.xml import params
> 
>     api = API(
>       url='https://rhevm35.example.com/ovirt-engine/api',
>       username='admin at internal',
>       password='******',
>       insecure=True,
>     )
> 
>     api.hosts.add(
>       host = params.Host(
>         name="myhost",
>         address="myhost.example.com <http://myhost.example.com>",
>         root_password="******"
>       )
>     )
> 
>     api.disconnect()
> 
>     --
>     Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
>     3ºD, 28016 Madrid, Spain
>     Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat
>     S.L.
> 
> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
> 


-- 
Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta
3ºD, 28016 Madrid, Spain
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.



More information about the Users mailing list