Perfect! Thanks!!! 😊


On Thu, 31 Jan 2019, 11:37 Dominik Holler <dholler@redhat.com wrote:
On Thu, 31 Jan 2019 10:52:21 +0200
ada per <adaper3@gmail.com> wrote:

> Thank you for your reply,
>
> Unfortunately i check all documentation and i  cant seem to find the
> cloud name that is generated by default from ovirt for openstack
> instances. I tried the hostname i used,  the provider name etc but
> nothing seems to work
>

The configuration if the python module 'openstack' is documented in
https://docs.openstack.org/python-openstackclient/pike/configuration/index.html
e.g. a file clouds.yaml in the working directory with content
similar to:
clouds:
  ovirt:
    auth:
      auth_url: https://0.0.0.0:35357/v2.0
      password: '123456'
      username: admin@internal
    verify: false

should do the trick.
Alternatively the configuration could be provided by the envoronment
variables: OS_USERNAME, OS_PASSWORD, OS_AUTH_URL
and OS_CACERT.

> On Wed, Jan 30, 2019 at 4:34 PM Dominik Holler <dholler@redhat.com>
> wrote:
>
> > On Wed, 30 Jan 2019 16:25:02 +0200
> > ada per <adaper3@gmail.com> wrote:
> >
> > > Just something i noticed with the removal of external logical
> > > networks script:
> > >
> > > > > network_service = networks_service.network_service(network.id)
> > > > > network_service.remove()
> > >
> > > it only removes the network from the network list , it does not
> > > remove it from the external provider.
> >
> >
> > Sorry, I did not mention this.
> > The network has to removed on the external provider manually, e.g.:
> > import openstack
> > cloud = openstack.connect(cloud='ovirt')
> > cloud.delete_network('ext_net')
> >
> >
> >
> > > And for that reason when im trying to recreate an external network
> > > with the *same
> > > name* as the previously removed one it comes up with error:
> > > ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail
> > > is "[Failed to communicate with the external provider, see log for
> > > additional details.]". HTTP response code is 400
> > >
> > > Is it a bug? How can it be resolved?
> > >
> > > On Tue, Jan 29, 2019 at 1:59 PM Dominik Holler
> > > <dholler@redhat.com> wrote:
> > >
> > > > On Tue, 29 Jan 2019 13:08:06 +0200
> > > > ada per <adaper3@gmail.com> wrote:
> > > >
> > > > > thank you!!
> > > > >
> > > > > Is there any other method to use the network name instead of
> > > > > id? if not its fine, i ll  use the list networks first and
> > > > > then match the ids with the names and delete accordingly
> > > > >
> > > >
> > > > I am not aware.
> > > > If you want to have more luxury, I recommend to use the ovirt_*
> > > > ansible roles.
> > > >
> > > > > On Tue, Jan 29, 2019 at 12:46 PM Dominik Holler
> > > > > <dholler@redhat.com> wrote:
> > > > >
> > > > > > On Tue, 29 Jan 2019 12:23:32 +0200
> > > > > > ada per <adaper3@gmail.com> wrote:
> > > > > >
> > > > > > > Hello again,
> > > > > > >
> > > > > > > And how about to delete a logical network?
> > > > > > > as remove option is not available in:
> > > > > > > system_service().networks_service()
> > > > > > >
> > > > > >
> > > > > > network_service =
> > > > > > networks_service.network_service(network.id)
> > > > > > network_service.remove()
> > > > > >
> > > > > > > On Mon, Jan 28, 2019 at 7:01 PM Dominik Holler
> > > > > > > <dholler@redhat.com> wrote:
> > > > > > >
> > > > > > > > On Mon, 28 Jan 2019 16:34:30 -0000
> > > > > > > > "ada per" <adaper3@gmail.com> wrote:
> > > > > > > >
> > > > > > > > > Hello everyone,
> > > > > > > > > I  have the following script,
> > > > > > > > > i ve been looking in ovirt-sdk but i cannot seem to
> > > > > > > > > find the proper way of adding an external provider
> > > > > > > > > network under ovirt-ovn I manage to add logical
> > > > > > > > > networks and vlans but no luck in external provider.
> > > > > > > > >
> > > > > > > > > Any advice is appreciated
> > > > > > > > >
> > > > > > > > > network = networks_service.add(
> > > > > > > > >     network=types.Network(
> > > > > > > > >         name='ext_net',
> > > > > > > > >         description='Testing network',
> > > > > > > > >         data_center=types.DataCenter(
> > > > > > > > >             name='Default'
> > > > > > > > >         ),
> > > > > > > > >              usages=[types.NetworkUsage.VM],
> > > > > > > > >              external_provider='ovirt-provider-ovn',
> > > > > > > > > -->i know this part is wrong what is it supposed to be
> > > > > > > > > called? ),
> > > > > > > >
> > > > > > > >         external_provider=types.OpenStackNetworkProvider(
> > > > > > > >             id=provider.id
> > > > > > > >         )
> > > > > > > >
> > > > > > > > please find a full example script in
> > > > > > > >
> > > > https://gist.github.com/dominikholler/be7286931c0ea26b14965a5f91783cd4
> > > > > > > >
> > > > > > > > > _______________________________________________
> > > > > > > > > Users mailing list -- users@ovirt.org
> > > > > > > > > To unsubscribe send an email to users-leave@ovirt.org
> > > > > > > > > Privacy Statement:
> > > > > > > > > https://www.ovirt.org/site/privacy-policy/ oVirt Code
> > > > > > > > > of Conduct:
> > > > > > > > > https://www.ovirt.org/community/about/community-guidelines/
> > > > > > > > > List Archives:
> > > > > > > > >
> > > > > > > >
> > > > > >
> > > >
> > https://lists.ovirt.org/archives/list/users@ovirt.org/message/LGGF7HZTMWDMCLNUATLHIXRYP7666TE4/
> > > > > > > >
> > > > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> >
> >