ContainX / openstack4j

A Fluent OpenStack SDK / Client Library for Java
http://openstack4j.com
Other
289 stars 368 forks source link

The network firewall update object NeutronFirewallUpdate error #416

Open tangxiaodon89 opened 9 years ago

tangxiaodon89 commented 9 years ago

I found these bug when i test the update method for firewall. the openstack version is kilo.

This is the JsonString parsed by FirewallUpdate object. image

error 1: ClientResponseException{message=Unrecognized attribute(s) 'policy', status=400, status-code=BAD_REQUEST} policyId have an get method getPolicy(). this method will generate an property('policy') when jackson parse the jsonString

@Override
@JsonIgnore
public String getPolicy() {
    return policyId;
}

error 2: ClientResponseException{message=Cannot update read-only attribute tenant_id, status=400, status-code=BAD_REQUEST} the tenant_id is readonly.

tangxiaodon89 commented 9 years ago

The FirewallRuleUpdate has the same error. ClientResponseException{message=Cannot update read-only attribute tenant_id, status=400, status-code=BAD_REQUEST}

vishvesh commented 9 years ago

Hi @tangxiaodon89 : I have tested and been using Neutron Firewalls (Firewall/Rule/Policy) in my setup, and I don't see any problems. Have even tested this repository's test cases, and it looks good. The @JsonIgnore on getPolicy() should not generate this error (JsonParser should ignore this method). I had been using it successfully in my setup! Not sure what changed in Kilo, but it shouldn't matter w.r.t the api. Can you give some detail about your call? Can you share your method call? Also, what are router_ids field in your Json? Afaik, there is no such field in any of the Firewall Classes, unless it has changed in Kilo?

wumingcheng commented 7 years ago

Hi @vishvesh : do you used in Kilo?I also have found this problem when firewallUpdate, the policyId will generate ‘policy’ json

wumingcheng commented 7 years ago

Hi @tangxiaodon89 : do you deal with this problem, I just have this problem, too.

kliu4 commented 7 years ago

We have similar problem here. Unrecognized attribute(s) 'policy