| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
Packaging result: ✔centos7 ✖centos8 ✔debian. JID-2613 |
Sorry, something went wrong.
Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
|
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Sorry, something went wrong.
|
Packaging result: ✔centos7 ✖centos8 ✔debian. JID-2619 |
Sorry, something went wrong.
|
@shwstppr good, thanks. |
Sorry, something went wrong.
|
@weizhouapache I think changing global setting name would require DB change and doc changes, the feature/user of the change is only UI so I guess that's why the setting name has ui in it. |
Sorry, something went wrong.
|
@weizhouapache maybe we can change setting name in master alongwith similar setting changes #4135? cc @rhtyd @DaanHoogland |
Sorry, something went wrong.
|
@shwstppr that PR also needs more attention to updates. I agree with the principle as this is not only UI but also API (which would be a security issue if it wasn't) as is this change lgtm |
Sorry, something went wrong.
@rhtyd @DaanHoogland |
Sorry, something went wrong.
Signed-off-by: Abhishek Kumar <abhishek.kumar@shapeblue.com>
|
@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Sorry, something went wrong.
|
Packaging result: ✔centos7 ✖centos8 ✔debian. JID-2627 |
Sorry, something went wrong.
There was a problem hiding this comment.
Verified Behaviour. LGTM
Sorry, something went wrong.
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Sorry, something went wrong.
|
Trillian test result (tid-3462)
|
Sorry, something went wrong.
* 4.14: server: prevent update vm read-only details (#4629)
PR apache#4629 made changes in updateVirtualMachine behaviour wrt readonly details. This change updates UI wrt new behaviour. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
PR #4629 made changes in updateVirtualMachine behaviour wrt readonly details. This change updates UI wrt new behaviour. Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
| Back | FazBrowse Home | New Git URL |
Description
Fixes behaviour in updateVirtualMachine API by disallowing updating read-only details (details mentioned in global setting user.vm.readonly.ui.details) of the VM for accounts other than root-admin using API. Such read-only details will be copied from original values.
Fixes #4514
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
(localcloud) 🐱 > list virtualmachine id=527a92ab-f59f-45fc-abc3-abf34ca5cbad { "virtualmachine": { "account": "user", "affinitygroup": [], "cpunumber": 1, "cpuspeed": 500, "cpuused": "10%", "created": "2021-01-28T14:39:08+0530", "details": { "newdetail": "somethingnew" }, "diskioread": 0, "diskiowrite": 0, "diskkbsread": 0, "diskkbswrite": 0, "displayname": "t1", "domain": "ROOT", "domainid": "b4924318-6146-11eb-9c0f-a0afbd4a2d60", "guestosid": "b48662d8-6146-11eb-9c0f-a0afbd4a2d60", "haenable": false, "hypervisor": "Simulator", "id": "527a92ab-f59f-45fc-abc3-abf34ca5cbad", "isdynamicallyscalable": false, "memory": 512, "memoryintfreekbs": 0, "memorykbs": 0, "memorytargetkbs": 0, "name": "t1", "networkkbsread": 32768, "networkkbswrite": 16384, "nic": [ { "extradhcpoption": [], "gateway": "10.1.1.1", "id": "530b68fb-d15e-43cc-bb52-20b4686251ea", "ipaddress": "10.1.1.61", "isdefault": true, "macaddress": "02:00:67:12:00:01", "netmask": "255.255.255.0", "networkid": "39d80951-0087-4ab2-9af7-3dc886d04eb2", "networkname": "test", "secondaryip": [], "traffictype": "Guest", "type": "Isolated" } ], "osdisplayname": "CentOS 5.6 (64-bit)", "ostypeid": "b48662d8-6146-11eb-9c0f-a0afbd4a2d60", "passwordenabled": false, "readonlyuidetails": "dataDiskController, rootDiskController, newdetail", "rootdeviceid": 0, "rootdevicetype": "ROOT", "securitygroup": [], "serviceofferingid": "6338335e-5ee7-4fcc-a0cb-4746ff0d35e3", "serviceofferingname": "Small Instance", "state": "Stopped", "tags": [], "templatedisplaytext": "CentOS 5.6 (64-bit) no GUI (Simulator)", "templateid": "4a0360b8-6147-11eb-9c0f-a0afbd4a2d60", "templatename": "CentOS 5.6 (64-bit) no GUI (Simulator)", "userid": "07af36d0-391a-4c56-a85a-ccde0611174b", "username": "user", "zoneid": "25849759-355c-49be-b004-664f34d77a65", "zonename": "Sandbox-simulator" } } (localcloud) 🐱 > set username admin (localcloud) 🐱 > sync Discovered 587 APIs (localcloud) 🐱 > list configurations name=user.vm.readonly.ui.details { "configuration": [ { "category": "Advanced", "description": "List of UI read-only VM settings/details as comma separated string", "isdynamic": true, "name": "user.vm.readonly.ui.details", "value": "dataDiskController, rootDiskController, newdetail" } ], "count": 1 } (localcloud) 🐱 > set username user (localcloud) 🐱 > sync Discovered 266 APIs (localcloud) 🐱 > update virtualmachine id=527a92ab-f59f-45fc-abc3-abf34ca5cbad details[0].newdetail=somethingevennew 🙈 Error: (HTTP 431, error code 4350) You're not allowed to add or edit the read-only setting: newdetail (localcloud) 🐱 > update virtualmachine id=527a92ab-f59f-45fc-abc3-abf34ca5cbad details[0].evennewdetail=somethingevenmorenew { "virtualmachine": { "account": "user", "affinitygroup": [], "cpunumber": 1, "cpuspeed": 500, "created": "2021-01-28T14:39:08+0530", "details": { "evennewdetail": "somethingevenmorenew", "newdetail": "somethingnew" }, "displayname": "t1", "domain": "ROOT", "domainid": "b4924318-6146-11eb-9c0f-a0afbd4a2d60", "guestosid": "b48662d8-6146-11eb-9c0f-a0afbd4a2d60", "haenable": false, "hypervisor": "Simulator", "id": "527a92ab-f59f-45fc-abc3-abf34ca5cbad", "isdynamicallyscalable": false, "memory": 512, "name": "t1", "nic": [ { "extradhcpoption": [], "gateway": "10.1.1.1", "id": "530b68fb-d15e-43cc-bb52-20b4686251ea", "ipaddress": "10.1.1.61", "isdefault": true, "macaddress": "02:00:67:12:00:01", "netmask": "255.255.255.0", "networkid": "39d80951-0087-4ab2-9af7-3dc886d04eb2", "networkname": "test", "secondaryip": [], "traffictype": "Guest", "type": "Isolated" } ], "osdisplayname": "CentOS 5.6 (64-bit)", "ostypeid": "b48662d8-6146-11eb-9c0f-a0afbd4a2d60", "passwordenabled": false, "readonlyuidetails": "dataDiskController, rootDiskController, newdetail", "rootdeviceid": 0, "rootdevicetype": "ROOT", "securitygroup": [], "serviceofferingid": "6338335e-5ee7-4fcc-a0cb-4746ff0d35e3", "serviceofferingname": "Small Instance", "state": "Stopped", "tags": [], "templatedisplaytext": "CentOS 5.6 (64-bit) no GUI (Simulator)", "templateid": "4a0360b8-6147-11eb-9c0f-a0afbd4a2d60", "templatename": "CentOS 5.6 (64-bit) no GUI (Simulator)", "userid": "07af36d0-391a-4c56-a85a-ccde0611174b", "username": "user", "zoneid": "25849759-355c-49be-b004-664f34d77a65", "zonename": "Sandbox-simulator" } }