apache / apache/cloudstack

Security group fields in the listVirtualmachines API call's response doesn't change

Đang mở
#6,999 13 bình luận 0 reaction 1 người được giao Được @soreana nhận Xem trên GitHub
component:api no-issue-activity Severity:Minor status:stale type:bug
Ngôn ngữ chính
Java
Star
3.1k
Fork
1.4k
Merge trung bình
6 ngày 19 giờ
Pull request đã merge (30 ngày)
32

Mô tả

In listVirtualMachines' response, we have a security group field. After further investigation, we noticed that this field doesn't change at all even if I add the ingress rule to the VM.

```
(local) > list virtualmachines id="152ee2cf-d9fb-4281-b222-1a9b1b73ef57" filter=id,name,displayname,securitygroup listall=true
{
"count": 1,
"virtualmachine": [
{
"displayname": "Sina-test-security-groups",
"id": "152ee2cf-d9fb-4281-b222-1a9b1b73ef57",
"name": "Sina-test-security-groups",
"securitygroup": [
{
"account": "admin",
"description": "",
"egressrule": [],
"id": "a2a75240-a7f2-42a4-9812-a9954b2d5ab2",
"ingressrule": [],
"name": "Sina-test",
"tags": [],
"virtualmachineids": []
}
]
}
]
}
(local) > list securitygroups virtualmachineid=152ee2cf-d9fb-4281-b222-1a9b1b73ef57
{
"count": 1,
"securitygroup": [
{
"account": "admin",
"description": "",
"domain": "ROOT",
"domainid": "84c14489-6263-11e3-aa07-d89d6717918c",
"egressrule": [],
"id": "a2a75240-a7f2-42a4-9812-a9954b2d5ab2",
"ingressrule": [
{
"cidr": "10.0.0.0/8",
"endport": 20,
"protocol": "tcp",
"ruleid": "506815f8-1586-4353-ac70-8009cff65be8",
"startport": 20,
"tags": []
}
],
"name": "Sina-test",
"tags": [],
"virtualmachinecount": 1,
"virtualmachineids": [
"152ee2cf-d9fb-4281-b222-1a9b1b73ef57"
]
}
]
}
```

##### ISSUE TYPE

* Bug Report

##### COMPONENT NAME

~~~
API
~~~

##### CLOUDSTACK VERSION

~~~
4.17.2
~~~

##### CONFIGURATION

~~~
Basic network with security group
~~~

##### SUMMARY

When I was testing a firewall rules, I noticed that adding an ingress rules to a VM's security group doesn't have any affect on the `listVirtualmachines` api call output. The ingress rule is always empty. As a result our automation tools should call two APIs rather than one to get correct informations. One to get the informations about the VM and another one to get security groups.

##### STEPS TO REPRODUCE

~~~
1. Call list virtual machine api call using cmk and check `securitygroup` field, it is empty.
2. Add some ingress rules to the security group.
3. Call list virtual machine api call using cmk and check `securitygroup` field again, it is empty.
~~~

##### EXPECTED RESULTS

~~~
The ingress rule added to the `securitygroup` field of the virtual machine API call.
~~~

##### ACTUAL RESULTS

~~~
The ingress rule in `securitygroup` is empty.
~~~

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.