-
Notifications
You must be signed in to change notification settings - Fork 366
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
Added Tacker Vnf - Attributes & TackerError Propagation.. #814
Conversation
* Added missing `Tacker Vnf` `static create()` method for setting `Vnf Attributes`..
* `TackerError` is now propagated.. * Currently `propagating` for `register - vim` call on status `500`.. * Currently there is no way to propagate `404` status as well..
* Added `500` status error propagation for `Vnf` and `Vnfd` Create call..
@vishvesh Is that the PR you want to continuously work on? Maybe worth adding a WIP, do not merge in the beginning for the time being. |
@auhlig : All the changes (except for I'll probably have a |
Ah okay. Cool. Code looks good so far 👍 Could you also add some short tests? Sounds good. I think it makes sense to get this one done and create a new PR for VPN. |
@auhlig : I tried adding tests for the same, but the only output I get is something like below: Sep 16, 2016 2:14:58 PM org.glassfish.jersey.filter.LoggingFilter log
INFO: 1 * Sending client request on thread http-nio-80-exec-3
1 > POST http://10.10.1.132:9890/v1.0/vims
1 > Accept: application/json
1 > Content-Type: application/json
1 > User-Agent: OpenStack4j / OpenStack Client
1 > X-Auth-Token: 52d880f348f74a0fac9c402648870e1e
{
"vim" : {
"name" : "test",
"description" : "test-desc",
"type" : "openstack",
"is_default" : true,
"auth_cred" : {
"username" : "admin",
"password" : "password",
"user_domain_name" : ""
},
"auth_url" : "",
"vim_project" : {
"name" : "",
"project_domain_name" : ""
}
}
}
|
I'd really appreciate tested code. |
@auhlig : The empty string that is being passed, is just a |
* Added `testRegisterVimWithTackerError` method for `simulating` an `TackerError`..
@auhlig : Test added.. Please Review !! 1 > POST http://127.0.0.1:9890/v1.0/vims
1 > Accept: application/json
1 > Content-Type: application/json
1 > User-Agent: OpenStack4j / OpenStack Client
1 > X-Auth-Token: 123456789
{
"vim" : {
"name" : "test-vim",
"description" : "test-vim-description",
"type" : "openstack",
"is_default" : true,
"auth_cred" : {
"username" : "admin",
"password" : "password",
"user_domain_name" : "default"
},
"auth_url" : "http://openstack.os4j.com:35357/v3",
"vim_project" : {
"name" : "admin"
}
}
}
Sep 19, 2016 4:07:42 PM okhttp3.mockwebserver.MockWebServer$4 processOneRequest
INFO: MockWebServer[9890] received request: POST /v1.0/vims HTTP/1.1 and responded: HTTP/1.1 500 Server Error
Sep 19, 2016 4:07:42 PM org.glassfish.jersey.filter.LoggingFilter log
INFO: 1 * Client response received on thread main
1 < 500
1 < Content-Length: 78
1 < Content-Type: application/json
{"TackerError": {"message": "'project_domain_name' is missing.", "code": 500}} |
Thanks for the work. LGTM |
What do think on this @vinodborole ? |
LGTM @auhlig |
Added
Tacker Vnf - Attributes
- StaticCreate
method..Tacker Vnf
static create()
method for settingVnf Attributes
..VnfBuilder attributes(VnfAttributes attributes);
Added
TackerError
Propagation..TackerError
is now propagated..propagating
forregister - vim
,create - vnf
andcreate vnfd
calls on status500
..404
status as well.. Can this be enhanced?create
method (with paramPropagateOnStatus
) only propagates on the providedstatus code
..