New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed list networks in projects after setting network permissions #6546
Fixed list networks in projects after setting network permissions #6546
Conversation
@blueorangutan package |
@harikrishna-patnala a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3752 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code LGTM, needs testing.
@blueorangutan package |
@harikrishna-patnala a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3753 |
@blueorangutan test |
@harikrishna-patnala a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Trillian test result (tid-4499)
|
@attr(tags=["advanced"], required_hardware="false") | ||
def test_06_list_networks_under_account(self): | ||
""" Testing list networks under an account """ | ||
self.create_network_permission(self.apiclient, self.user_network, self.domain_admin, None, expected=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@harikrishna-patnala
would it be good to create network permission to otheruser
(not domain_admin
) as well ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added few more checks in the same test case @weizhouapache
@blueorangutan package |
@harikrishna-patnala a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Found UI changes, kicking a new UI QA build |
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
UI build: ✔️ |
Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 3792 |
@harikrishna-patnala a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Kudos, SonarCloud Quality Gate passed! |
Trillian test result (tid-4544)
|
@blueorangutan test |
@shwstppr a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Trillian test result (tid-4549)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test using cmk
As user ACSUser create a project and create a network outside this project
(sblab) 🐕 > create project name=shareproject displaytext=shareproject
{
"project": {
"cpuavailable": "40",
"cpulimit": "40",
"cputotal": 0,
"created": "2022-07-27T08:15:58+0000",
"displaytext": "shareproject",
"domain": "ROOT",
"domainid": "2e8b5f3a-f71a-11ec-87b5-1e0057000461",
"id": "1ad3e648-c9d2-4b7f-b87a-2a713477762e",
"ipavailable": "18",
"iplimit": "20",
"iptotal": 0,
"memoryavailable": "40960",
"memorylimit": "40960",
"memorytotal": 0,
"name": "shareproject",
"networkavailable": "20",
"networklimit": "20",
"networktotal": 0,
"owner": [
{
"account": "ACSUser"
}
],
"primarystorageavailable": "200",
"primarystoragelimit": "200",
"primarystoragetotal": 0,
"projectaccountname": "PrjAcct-shareproject-1",
"secondarystorageavailable": "400.0",
"secondarystoragelimit": "400",
"secondarystoragetotal": 0,
"snapshotavailable": "20",
"snapshotlimit": "20",
"snapshottotal": 0,
"state": "Active",
"tags": [],
"templateavailable": "20",
"templatelimit": "20",
"templatetotal": 0,
"vmavailable": "20",
"vmlimit": "20",
"vmrunning": 0,
"vmstopped": 0,
"vmtotal": 0,
"volumeavailable": "20",
"volumelimit": "20",
"volumetotal": 0,
"vpcavailable": "20",
"vpclimit": "20",
"vpctotal": 0
}
}
(sblab) 🐓 > create network zoneid=2e44d4bc-63a5-4510-885d-f5ee182a46a3 networkofferingid=6004bac4-624d-4ed5-85b7-939fcf08bdbf name=testshare displaytext=testshare
{
"network": {
"account": "ACSUser",
"acltype": "Account",
"broadcastdomaintype": "Vlan",
"canusefordeploy": true,
"created": "2022-07-27T08:16:46+0000",
"displaytext": "testshare",
"dns1": "10.0.32.1",
"dns2": "8.8.8.8",
"domain": "ROOT",
"domainid": "2e8b5f3a-f71a-11ec-87b5-1e0057000461",
"hasannotations": false,
"id": "9e4f4ddc-cef9-4edb-adf5-c0fb8ca53eff",
"ispersistent": false,
"issystem": false,
"name": "testshare",
"networkofferingavailability": "Optional",
"networkofferingconservemode": true,
"networkofferingdisplaytext": "Offering for L2 networks",
"networkofferingid": "6004bac4-624d-4ed5-85b7-939fcf08bdbf",
"networkofferingname": "DefaultL2NetworkOffering",
"physicalnetworkid": "c70efc52-66d9-4287-b404-56234aff5a69",
"receivedbytes": 0,
"redundantrouter": false,
"related": "9e4f4ddc-cef9-4edb-adf5-c0fb8ca53eff",
"restartrequired": false,
"sentbytes": 0,
"service": [],
"specifyipranges": false,
"state": "Allocated",
"strechedl2subnet": false,
"tags": [],
"traffictype": "Guest",
"type": "L2",
"zoneid": "2e44d4bc-63a5-4510-885d-f5ee182a46a3",
"zonename": "ref-trl-3339-v-M7-abhishek-kumar"
}
}
As root admin admin add user user1 to the project and share network in the project
(sblab) 🐧 > set username admin
(sblab) 🐄 > add accounttoproject projectid=1ad3e648-c9d2-4b7f-b87a-2a713477762e account=user1
{
"success": true
}
(sblab) 🕊 > create networkpermissions networkid=9e4f4ddc-cef9-4edb-adf5-c0fb8ca53eff projectids=1ad3e648-c9d2-4b7f-b87a-2a713477762e
{
"success": true
}
As user user1 list the network shared with the project and deploy vm using it
(sblab) 🐋 > set username user1
(sblab) 🐌 > sync
Discovered 287 APIs
(sblab) 🐥 > list networks projectid=1ad3e648-c9d2-4b7f-b87a-2a713477762e filter=id,name
{
"count": 1,
"network": [
{
"id": "9e4f4ddc-cef9-4edb-adf5-c0fb8ca53eff",
"name": "testshare"
}
(sblab) 🕊 > deploy virtualmachine zoneid=2e44d4bc-63a5-4510-885d-f5ee182a46a3 templateid=2e8ff6e7-f71a-11ec-87b5-1e0057000461 serviceofferingid=d3c5c723-cfda-4157-9944-276aebb9c7f8 projectid=1ad3e648-c9d2-4b7f-b87a-2a713477762e networkids=9e4f4ddc-cef9-4edb-adf5-c0fb8ca53eff
{
"virtualmachine": {
"affinitygroup": [],
"cpunumber": 1,
"cpuspeed": 500,
"created": "2022-07-27T08:21:24+0000",
"details": {
"dataDiskController": "osdefault",
"rootDiskController": "ide"
},
"displayname": "VM-1cbcbcf1-92e3-4daa-b58c-0a427450f4a0",
"domain": "ROOT",
"domainid": "2e8b5f3a-f71a-11ec-87b5-1e0057000461",
"guestosid": "2e94757c-f71a-11ec-87b5-1e0057000461",
"haenable": false,
"hasannotations": false,
"hypervisor": "VMware",
"id": "1cbcbcf1-92e3-4daa-b58c-0a427450f4a0",
"isdynamicallyscalable": false,
"jobid": "ced60ad4-8142-4cec-9839-04179f53bc79",
"jobstatus": 0,
"lastupdated": "2022-07-27T08:22:14+0000",
"memory": 512,
"name": "VM-1cbcbcf1-92e3-4daa-b58c-0a427450f4a0",
"nic": [
{
"broadcasturi": "vlan://1028",
"deviceid": "0",
"extradhcpoption": [],
"id": "c6ded695-c1ea-4429-8d21-95e92a429fe0",
"isdefault": true,
"isolationuri": "vlan://1028",
"macaddress": "02:00:14:57:00:01",
"networkid": "9e4f4ddc-cef9-4edb-adf5-c0fb8ca53eff",
"networkname": "testshare",
"secondaryip": [],
"traffictype": "Guest",
"type": "L2"
}
],
"osdisplayname": "CentOS 5.3 (64-bit)",
"ostypeid": "2e94757c-f71a-11ec-87b5-1e0057000461",
"passwordenabled": false,
"pooltype": "NetworkFilesystem",
"project": "shareproject",
"projectid": "1ad3e648-c9d2-4b7f-b87a-2a713477762e",
"readonlydetails": "dataDiskController, rootDiskController",
"receivedbytes": 0,
"rootdeviceid": 0,
"rootdevicetype": "ROOT",
"securitygroup": [],
"sentbytes": 0,
"serviceofferingid": "d3c5c723-cfda-4157-9944-276aebb9c7f8",
"serviceofferingname": "Small Instance",
"state": "Running",
"tags": [],
"templatedisplaytext": "CentOS 5.3(64-bit) no GUI (vSphere)",
"templateid": "2e8ff6e7-f71a-11ec-87b5-1e0057000461",
"templatename": "CentOS 5.3(64-bit) no GUI (vSphere)",
"userid": "3d668558-b1fe-4aad-bded-9cbc8515dedf",
"username": "user1",
"zoneid": "2e44d4bc-63a5-4510-885d-f5ee182a46a3",
"zonename": "ref-trl-3339-v-M7-abhishek-kumar"
}
}
@blueorangutan package |
@rohityadavcloud a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3835 |
@blueorangutan test |
@harikrishna-patnala a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Trillian Build Failed (tid-4560) |
@blueorangutan test |
@harikrishna-patnala a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
Trillian Build Failed (tid-4561) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM based on manual testing (as admin and as a user, default or custom project)
@blueorangutan package |
@shwstppr a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 3860 |
@blueorangutan test centos7 vmware-67u3 |
@shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
Trillian test result (tid-4577)
|
@blueorangutan test centos7 vmware-67u3 |
@shwstppr a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests |
Trillian test result (tid-4579)
|
…ache#6546) This PR fixes apache#6544 where it could not list networks in a project even after network permissions are set. * Added test cases to existing component tests to test network permissions * Moved test_network_permissions.py from component to smoke tests * Added test_network_permissions to travis.yml under smoke tests
Description
This PR fixes #6544 where it could not list networks in a project even after network permissions are set.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?