-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix project-based network filtering in unmanaged instance import #12854
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
base: main
Are you sure you want to change the base?
Changes from all commits
120a436
58916eb
c3d6a8c
db83622
7aa0558
71daf84
7f7d0b0
2359061
27bce46
34bed7a
5f1daca
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -39,8 +39,8 @@ select | |||||||||||||||||||||||||||||||||||||||
| `data_center`.`id` AS `data_center_id`, | ||||||||||||||||||||||||||||||||||||||||
| `data_center`.`uuid` AS `data_center_uuid`, | ||||||||||||||||||||||||||||||||||||||||
| `data_center`.`name` AS `data_center_name`, | ||||||||||||||||||||||||||||||||||||||||
| `account_netstats_view`.`bytesReceived` AS `bytesReceived`, | ||||||||||||||||||||||||||||||||||||||||
| `account_netstats_view`.`bytesSent` AS `bytesSent`, | ||||||||||||||||||||||||||||||||||||||||
| `account_netstats`.`bytesReceived` AS `bytesReceived`, | ||||||||||||||||||||||||||||||||||||||||
| `account_netstats`.`bytesSent` AS `bytesSent`, | ||||||||||||||||||||||||||||||||||||||||
| `vmlimit`.`max` AS `vmLimit`, | ||||||||||||||||||||||||||||||||||||||||
| `vmcount`.`count` AS `vmTotal`, | ||||||||||||||||||||||||||||||||||||||||
| `runningvm`.`vmcount` AS `runningVms`, | ||||||||||||||||||||||||||||||||||||||||
|
|
@@ -89,8 +89,15 @@ from | |||||||||||||||||||||||||||||||||||||||
| `cloud`.`domain` ON account.domain_id = domain.id | ||||||||||||||||||||||||||||||||||||||||
| left join | ||||||||||||||||||||||||||||||||||||||||
| `cloud`.`data_center` ON account.default_zone_id = data_center.id | ||||||||||||||||||||||||||||||||||||||||
| left join | ||||||||||||||||||||||||||||||||||||||||
| `cloud`.`account_netstats_view` ON account.id = account_netstats_view.account_id | ||||||||||||||||||||||||||||||||||||||||
| left join lateral ( | ||||||||||||||||||||||||||||||||||||||||
| select | ||||||||||||||||||||||||||||||||||||||||
| coalesce(sum(`user_statistics`.`net_bytes_received` + `user_statistics`.`current_bytes_received`), 0) AS `bytesReceived`, | ||||||||||||||||||||||||||||||||||||||||
| coalesce(sum(`user_statistics`.`net_bytes_sent` + `user_statistics`.`current_bytes_sent`), 0) AS `bytesSent` | ||||||||||||||||||||||||||||||||||||||||
| from | ||||||||||||||||||||||||||||||||||||||||
| `cloud`.`user_statistics` | ||||||||||||||||||||||||||||||||||||||||
| where | ||||||||||||||||||||||||||||||||||||||||
| `user_statistics`.`account_id` = `account`.`id` | ||||||||||||||||||||||||||||||||||||||||
| ) AS `account_netstats` ON TRUE | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+92
to
+100
|
||||||||||||||||||||||||||||||||||||||||
| left join lateral ( | |
| select | |
| coalesce(sum(`user_statistics`.`net_bytes_received` + `user_statistics`.`current_bytes_received`), 0) AS `bytesReceived`, | |
| coalesce(sum(`user_statistics`.`net_bytes_sent` + `user_statistics`.`current_bytes_sent`), 0) AS `bytesSent` | |
| from | |
| `cloud`.`user_statistics` | |
| where | |
| `user_statistics`.`account_id` = `account`.`id` | |
| ) AS `account_netstats` ON TRUE | |
| left join ( | |
| select | |
| `user_statistics`.`account_id` AS `account_id`, | |
| coalesce(sum(coalesce(`user_statistics`.`net_bytes_received`, 0) + coalesce(`user_statistics`.`current_bytes_received`, 0)), 0) AS `bytesReceived`, | |
| coalesce(sum(coalesce(`user_statistics`.`net_bytes_sent`, 0) + coalesce(`user_statistics`.`current_bytes_sent`, 0)), 0) AS `bytesSent` | |
| from | |
| `cloud`.`user_statistics` | |
| group by | |
| `user_statistics`.`account_id` | |
| ) AS `account_netstats` ON `account_netstats`.`account_id` = `account`.`id` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| el8 | ||
| el8 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| el8 | ||
| el8 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| el8 | ||
| el8 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| el8 | ||
| el8 |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,31 +1,22 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||
| // Licensed to the Apache Software Foundation (ASF) under one | ||||||||||||||||||||||||||||||||||||||||||||||||
| // or more contributor license agreements. See the NOTICE file | ||||||||||||||||||||||||||||||||||||||||||||||||
| // distributed with this work for additional information | ||||||||||||||||||||||||||||||||||||||||||||||||
| // regarding copyright ownership. The ASF licenses this file | ||||||||||||||||||||||||||||||||||||||||||||||||
| // to you under the Apache License, Version 2.0 (the | ||||||||||||||||||||||||||||||||||||||||||||||||
| // "License"); you may not use this file except in compliance | ||||||||||||||||||||||||||||||||||||||||||||||||
| // with the License. You may obtain a copy of the License at | ||||||||||||||||||||||||||||||||||||||||||||||||
| // | ||||||||||||||||||||||||||||||||||||||||||||||||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||||||||||||||||||||||||||||||||||||||||||||||||
| // | ||||||||||||||||||||||||||||||||||||||||||||||||
| // Unless required by applicable law or agreed to in writing, | ||||||||||||||||||||||||||||||||||||||||||||||||
| // software distributed under the License is distributed on an | ||||||||||||||||||||||||||||||||||||||||||||||||
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||||||||||||||||||||||||||||||||||||||||||||||||
| // KIND, either express or implied. See the License for the | ||||||||||||||||||||||||||||||||||||||||||||||||
| // specific language governing permissions and limitations | ||||||||||||||||||||||||||||||||||||||||||||||||
| // under the License. | ||||||||||||||||||||||||||||||||||||||||||||||||
| // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE | ||||||||||||||||||||||||||||||||||||||||||||||||
| file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this | ||||||||||||||||||||||||||||||||||||||||||||||||
| file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance | ||||||||||||||||||||||||||||||||||||||||||||||||
| // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // | ||||||||||||||||||||||||||||||||||||||||||||||||
| Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on | ||||||||||||||||||||||||||||||||||||||||||||||||
| an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the | ||||||||||||||||||||||||||||||||||||||||||||||||
| // specific language governing permissions and limitations // under the License. | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+1
to
+7
|
||||||||||||||||||||||||||||||||||||||||||||||||
| // Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE | |
| file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this | |
| file // to you under the Apache License, Version 2.0 (the // "License"); you may not use this file except in compliance | |
| // with the License. You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // | |
| Unless required by applicable law or agreed to in writing, // software distributed under the License is distributed on | |
| an // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY // KIND, either express or implied. See the License for the | |
| // specific language governing permissions and limitations // under the License. | |
| // Licensed to the Apache Software Foundation (ASF) under one | |
| // or more contributor license agreements. See the NOTICE file | |
| // distributed with this work for additional information | |
| // regarding copyright ownership. The ASF licenses this file | |
| // to you under the Apache License, Version 2.0 (the | |
| // "License"); you may not use this file except in compliance | |
| // with the License. You may obtain a copy of the License at | |
| // | |
| // http://www.apache.org/licenses/LICENSE-2.0 | |
| // | |
| // Unless required by applicable law or agreed to in writing, | |
| // software distributed under the License is distributed on an | |
| // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| // KIND, either express or implied. See the License for the | |
| // specific language governing permissions and limitations | |
| // under the License. |
Copilot
AI
Mar 25, 2026
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.
The PR description focuses on project-based network filtering for unmanaged instance import, but this PR also includes broad unrelated changes across backend Java classes, schema views, API annotations, multiple unrelated UI pages, tests, and packaging files. This makes review and rollback riskier; please consider splitting these unrelated changes into separate PRs (or justify why they’re coupled to this fix).
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.
Removing
required=truechanges the API contract. If the intent is to allow eithergatewayIdornexthop, the command should enforce (and clearly document) that exactly one of the two is provided (and fail with a clear error otherwise). As-is, clients may be able to submit requests without either parameter depending on other validations.