Bug 834198 - OVIRT-CLI: update network by name doesn't work
OVIRT-CLI: update network by name doesn't work
Product: oVirt
Classification: Community
Component: ovirt-engine-cli (Show other bugs)
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Michael Pasternak
infra network
: 834841 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2012-06-21 03:52 EDT by Elena
Modified: 2014-01-12 20:45 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-12-17 02:49:05 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Elena 2012-06-21 03:52:47 EDT
update network testrest2  --description 'Test Desciption' --name 'testrest3'

Got an error in cli and engine.log:
2012-06-21 10:04:04,150 WARN  [org.ovirt.engine.core.bll.storage.UpdateNetworkCommand] (ajp-- [24c01206] CanDoAction of action UpdateNetwork failed. Reasons:VAR__ACTION__UPDATE,VAR__TYPE__NETWORK,NETWORK_CAN_NOT_REMOVE_DEFAULT_NETWORK

According to Michael - the problem is in restapi: api reports /api/networks as searchable collection
Comment 1 Michael Pasternak 2012-06-21 04:10:46 EDT
entire update of network (by-name [1]) won't work cause, used following
pattern [2] to retrieve network by-name while actually /api/network
is non-searchable collection,

bottom line, restapi reports /api/network collection as searchable while 
it is not.

p.s future versions of CLI will not retrieve object on update before setting 
fields in it [3]

[1] update network my_network --description aaa --name bbb
[2] /api/networks?search=name%3Dmy_network
[3] https://bugzilla.redhat.com/show_bug.cgi?id=834202
Comment 2 Michael Pasternak 2012-06-21 04:34:13 EDT
Oded, you have simple workaround: update network by id [1], so i'm
not sure this is high priority bug.


[oVirt shell (connected)]# update network "e7449227-31a0-46a9-856c-e61439dade62" --description aaa --name bbb

id            : e7449227-31a0-46a9-856c-e61439dade62
name          : bbb
description   : aaa
data_center-id: c747d78b-ee6a-485c-8f81-1b9d46be51e9
display       : False
mtu           : 0
required      : False
status-state  : non_operational
stp           : False
usages-usage  : VM
Comment 3 Michael Pasternak 2012-06-24 04:00:48 EDT
*** Bug 834841 has been marked as a duplicate of this bug. ***
Comment 4 Michael Pasternak 2012-07-04 09:22:09 EDT
use sdk >=
Comment 5 Elena 2012-08-09 01:20:06 EDT
Verified in rhevm-sdk-, rhevm-cli-

Note You need to log in before you can comment on or make changes to this bug.