ContainX / openstack4j

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

OpenStackj4 Neutron Networks object incompatible #1148

Closed Chekov2k closed 6 years ago

Chekov2k commented 6 years ago

We are running a Kolla Pike 5.0.0 release OpenStack cluster and are getting a connection issue (see below). By the looks of it, the network object returned by the API does not seem compatible. We are using Jenkins version 2.60.3 and an OpenStack Jenkins Cloud plugin version of 2.29

Connection not validated, plugin might not operate correctly: Root name 'networks' does not match expected ('network') for type [simple type, class org.openstack4j.openstack.networking.domain.NeutronNetwork]
at [Source: {"networks":[{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"03e8c170-917f-43b2-a4e4-e4b875f9a683","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["6c656a61-b772-42b1-8add-4bc990811309"],"description":"","tags":[],"updated_at":"2018-02-05T11:03:13Z","qos_policy_id":null,"name":"dong","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-02-05T11:03:13Z","mtu":1450},{"updated_at":"2018-01-31T08:44:58Z","dns_domain":"","revision_number":9,"port_security_enabled":true,"id":"19576d0f-9e2f-43ce-ab2d-182f73998c5d","router:external":true,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"2b21740906894aaa908a8a443943aaf8","status":"ACTIVE","subnets":["8857b71d-52ae-4e0e-a72c-7ac1dcd78425"],"description":"","tags":[],"ipv6_address_scope":null,"is_default":false,"qos_policy_id":null,"name":"external","admin_state_up":true,"tenant_id":"2b21740906894aaa908a8a443943aaf8","created_at":"2018-01-18T11:19:44Z","mtu":1500},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"219b777e-76b5-4086-827f-67b8e6225d8a","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["8f07dab4-0168-407a-8bb5-d2b02e7c7ff8"],"description":"","tags":[],"updated_at":"2018-01-31T10:16:11Z","qos_policy_id":null,"name":"test-fp","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-01-31T10:16:10Z","mtu":1450},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"39aea290-5b63-4240-9c0f-cec5cd902d50","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["8a464019-3fc4-450d-9e20-6b64c1f4a95d"],"description":"","tags":[],"updated_at":"2018-02-05T15:20:51Z","qos_policy_id":null,"name":"shift_on_stack","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-02-05T15:20:03Z","mtu":1450},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"8025ff2d-19d6-4456-b765-d855a211b05d","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["8d165d58-fa04-46c5-8919-6fbcbe8ed4db"],"description":"","tags":[],"updated_at":"2018-02-05T10:15:04Z","qos_policy_id":null,"name":"bam","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-02-05T10:15:03Z","mtu":1450},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"dd477cb7-ae97-41da-a8f7-55b25062b83d","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["bd5be583-2d72-4fa9-8b01-802f66f72caa"],"description":"","tags":[],"updated_at":"2018-01-18T11:51:08Z","qos_policy_id":null,"name":"internal","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-01-18T11:51:07Z","mtu":1450},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"e510a7fc-042b-4cde-8213-c493d3c83ed5","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["3c35c4da-47a1-44cd-9cd5-2f9abc1f484d"],"description":"","tags":[],"updated_at":"2018-02-05T10:22:47Z","qos_policy_id":null,"name":"joes-shift-on-stack","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-02-05T10:22:25Z","mtu":1450}]}; line: 1, column: 2]
com.fasterxml.jackson.databind.JsonMappingException: Root name 'networks' does not match expected ('network') for type [simple type, class org.openstack4j.openstack.networking.domain.NeutronNetwork]
 at [Source: {"networks":[{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"03e8c170-917f-43b2-a4e4-e4b875f9a683","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["6c656a61-b772-42b1-8add-4bc990811309"],"description":"","tags":[],"updated_at":"2018-02-05T11:03:13Z","qos_policy_id":null,"name":"dong","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-02-05T11:03:13Z","mtu":1450},{"updated_at":"2018-01-31T08:44:58Z","dns_domain":"","revision_number":9,"port_security_enabled":true,"id":"19576d0f-9e2f-43ce-ab2d-182f73998c5d","router:external":true,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"2b21740906894aaa908a8a443943aaf8","status":"ACTIVE","subnets":["8857b71d-52ae-4e0e-a72c-7ac1dcd78425"],"description":"","tags":[],"ipv6_address_scope":null,"is_default":false,"qos_policy_id":null,"name":"external","admin_state_up":true,"tenant_id":"2b21740906894aaa908a8a443943aaf8","created_at":"2018-01-18T11:19:44Z","mtu":1500},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"219b777e-76b5-4086-827f-67b8e6225d8a","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["8f07dab4-0168-407a-8bb5-d2b02e7c7ff8"],"description":"","tags":[],"updated_at":"2018-01-31T10:16:11Z","qos_policy_id":null,"name":"test-fp","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-01-31T10:16:10Z","mtu":1450},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"39aea290-5b63-4240-9c0f-cec5cd902d50","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["8a464019-3fc4-450d-9e20-6b64c1f4a95d"],"description":"","tags":[],"updated_at":"2018-02-05T15:20:51Z","qos_policy_id":null,"name":"shift_on_stack","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-02-05T15:20:03Z","mtu":1450},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"8025ff2d-19d6-4456-b765-d855a211b05d","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["8d165d58-fa04-46c5-8919-6fbcbe8ed4db"],"description":"","tags":[],"updated_at":"2018-02-05T10:15:04Z","qos_policy_id":null,"name":"bam","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-02-05T10:15:03Z","mtu":1450},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"dd477cb7-ae97-41da-a8f7-55b25062b83d","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["bd5be583-2d72-4fa9-8b01-802f66f72caa"],"description":"","tags":[],"updated_at":"2018-01-18T11:51:08Z","qos_policy_id":null,"name":"internal","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-01-18T11:51:07Z","mtu":1450},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"e510a7fc-042b-4cde-8213-c493d3c83ed5","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["3c35c4da-47a1-44cd-9cd5-2f9abc1f484d"],"description":"","tags":[],"updated_at":"2018-02-05T10:22:47Z","qos_policy_id":null,"name":"joes-shift-on-stack","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-02-05T10:22:25Z","mtu":1450}]}; line: 1, column: 2]
    at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:216)
    at com.fasterxml.jackson.databind.ObjectReader._unwrapAndDeserialize(ObjectReader.java:1648)
    at com.fasterxml.jackson.databind.ObjectReader._bindAndClose(ObjectReader.java:1572)
    at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:1200)
    at org.openstack4j.connectors.okhttp.HttpResponseImpl.readEntity(HttpResponseImpl.java:122)
Caused: ClientResponseException{message=Root name 'networks' does not match expected ('network') for type [simple type, class org.openstack4j.openstack.networking.domain.NeutronNetwork]
 at [Source: {"networks":[{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"03e8c170-917f-43b2-a4e4-e4b875f9a683","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["6c656a61-b772-42b1-8add-4bc990811309"],"description":"","tags":[],"updated_at":"2018-02-05T11:03:13Z","qos_policy_id":null,"name":"dong","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-02-05T11:03:13Z","mtu":1450},{"updated_at":"2018-01-31T08:44:58Z","dns_domain":"","revision_number":9,"port_security_enabled":true,"id":"19576d0f-9e2f-43ce-ab2d-182f73998c5d","router:external":true,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"2b21740906894aaa908a8a443943aaf8","status":"ACTIVE","subnets":["8857b71d-52ae-4e0e-a72c-7ac1dcd78425"],"description":"","tags":[],"ipv6_address_scope":null,"is_default":false,"qos_policy_id":null,"name":"external","admin_state_up":true,"tenant_id":"2b21740906894aaa908a8a443943aaf8","created_at":"2018-01-18T11:19:44Z","mtu":1500},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"219b777e-76b5-4086-827f-67b8e6225d8a","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["8f07dab4-0168-407a-8bb5-d2b02e7c7ff8"],"description":"","tags":[],"updated_at":"2018-01-31T10:16:11Z","qos_policy_id":null,"name":"test-fp","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-01-31T10:16:10Z","mtu":1450},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"39aea290-5b63-4240-9c0f-cec5cd902d50","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["8a464019-3fc4-450d-9e20-6b64c1f4a95d"],"description":"","tags":[],"updated_at":"2018-02-05T15:20:51Z","qos_policy_id":null,"name":"shift_on_stack","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-02-05T15:20:03Z","mtu":1450},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"8025ff2d-19d6-4456-b765-d855a211b05d","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["8d165d58-fa04-46c5-8919-6fbcbe8ed4db"],"description":"","tags":[],"updated_at":"2018-02-05T10:15:04Z","qos_policy_id":null,"name":"bam","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-02-05T10:15:03Z","mtu":1450},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"dd477cb7-ae97-41da-a8f7-55b25062b83d","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["bd5be583-2d72-4fa9-8b01-802f66f72caa"],"description":"","tags":[],"updated_at":"2018-01-18T11:51:08Z","qos_policy_id":null,"name":"internal","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-01-18T11:51:07Z","mtu":1450},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"e510a7fc-042b-4cde-8213-c493d3c83ed5","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["3c35c4da-47a1-44cd-9cd5-2f9abc1f484d"],"description":"","tags":[],"updated_at":"2018-02-05T10:22:47Z","qos_policy_id":null,"name":"joes-shift-on-stack","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-02-05T10:22:25Z","mtu":1450}]}; line: 1, column: 2], status=0, status-code=CODE_UNKNOWN}
    at org.openstack4j.connectors.okhttp.HttpResponseImpl.readEntity(HttpResponseImpl.java:125)
    at org.openstack4j.core.transport.HttpEntityHandler.handle(HttpEntityHandler.java:66)
    at org.openstack4j.connectors.okhttp.HttpResponseImpl.getEntity(HttpResponseImpl.java:69)
    at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:220)
    at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:202)
    at org.openstack4j.openstack.networking.internal.NetworkServiceImpl.get(NetworkServiceImpl.java:65)
    at jenkins.plugins.openstack.compute.internal.Openstack.sanityCheck(Openstack.java:702)
    at jenkins.plugins.openstack.compute.JCloudsCloud$DescriptorImpl.doTestConnection(JCloudsCloud.java:421)
    at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
    at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
    at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
    at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
    at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
    at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:248)
    at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
    at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
    at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
    at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
    at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
    at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
    at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
    at jenkins.metrics.impl.MetricsFilter.doFilter(MetricsFilter.java:125)
    at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
    at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:138)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
    at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:92)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
    at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
    at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
    at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
    at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:499)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
    at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Chekov2k commented 6 years ago

Updated to Jenkins Cloud plugin 2.30 which uses OpenStack4J 3.1.0 and still getting the same error

Chekov2k commented 6 years ago

So, I have been trying to debug this and the minimum working example to reproduce is:

package com.mycompany.app;

import org.openstack4j.api.OSClient.OSClientV3;
import org.openstack4j.openstack.OSFactory;
import org.openstack4j.model.common.Identifier;
import org.openstack4j.api.client.IOSClientBuilder;
import org.openstack4j.core.transport.Config;

public class App
{
    public static void main( String[] args )
    {
        Identifier projectDomainIdentifier = Identifier.byName("domain");
        Identifier projectNameIdentifier = Identifier.byName("project");
        Identifier userDomainIdentifier = Identifier.byName("domain");

        IOSClientBuilder.V3 builder = OSFactory.builderV3().endpoint("url:5000/v3").credentials("user", "password", userDomainIdentifier).scopeToProject(projectNameIdentifier, projectDomainIdentifier);

        Config config = Config.newConfig();

        OSClientV3 client = builder
                .withConfig(config)
                .authenticate()
                .useRegion("region");

        client.networking().network().get("");
    }
}

and the exception I get is the same:

Exception in thread "main" javax.ws.rs.ProcessingException: com.fasterxml.jackson.databind.JsonMappingException: Root name 'networks' does not match expected ('network') for type [simple type, class org.openstack4j.openstack.networking.domain.NeutronNetwork]
 at [Source: java.io.ByteArrayInputStream@17aad511; line: 1, column: 2]
    at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:300)
    at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:196)
    at org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:218)
    at org.openstack4j.connectors.resteasy.HttpResponseImpl.readEntity(HttpResponseImpl.java:118)
    at org.openstack4j.core.transport.HttpEntityHandler.handle(HttpEntityHandler.java:66)
    at org.openstack4j.connectors.resteasy.HttpResponseImpl.getEntity(HttpResponseImpl.java:64)
    at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:225)
    at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:207)
    at org.openstack4j.openstack.networking.internal.NetworkServiceImpl.get(NetworkServiceImpl.java:65)
    at com.mycompany.app.App.main(App.java:34)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Root name 'networks' does not match expected ('network') for type [simple type, class org.openstack4j.openstack.networking.domain.NeutronNetwork]
 at [Source: java.io.ByteArrayInputStream@17aad511; line: 1, column: 2]
    at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:216)
    at com.fasterxml.jackson.databind.ObjectReader._unwrapAndDeserialize(ObjectReader.java:1648)
    at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1531)
    at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:944)
    at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:811)
    at org.jboss.resteasy.core.interception.jaxrs.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:66)
    at org.jboss.resteasy.core.interception.jaxrs.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:56)
    at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:266)
    ... 9 more
Chekov2k commented 6 years ago

And some more verbose:

DEBUG HttpExecutor - Executing Request: https://openstack:5000/v3 -> /auth/tokens
DEBUG logging - Logging Provider: org.jboss.logging.Log4jLoggerProvider
DEBUG i18n - Interceptor Context: org.jboss.resteasy.core.interception.jaxrs.ClientWriterInterceptorContext,  Method : proceed
DEBUG i18n - MessageBodyWriter: org.jboss.resteasy.spi.ResteasyProviderFactory$SortedKey
DEBUG i18n - MessageBodyWriter: com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider
DEBUG RequestAddCookies - CookieSpec selected: default
DEBUG RequestAuthCache - Auth cache not set in the context
DEBUG PoolingHttpClientConnectionManager - Connection request: [route: {s}->https://openstack:5000][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
DEBUG PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: {s}->https://openstack:5000][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
DEBUG MainClientExec - Opening connection {s}->https://openstack:5000
DEBUG DefaultHttpClientConnectionOperator - Connecting to openstack/10.6.26.9:5000
DEBUG SSLConnectionSocketFactory - Connecting socket to openstack/10.6.26.9:5000 with timeout 0
DEBUG SSLConnectionSocketFactory - Enabled protocols: [TLSv1, TLSv1.1, TLSv1.2]
DEBUG SSLConnectionSocketFactory - Enabled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
DEBUG SSLConnectionSocketFactory - Starting handshake
DEBUG SSLConnectionSocketFactory - Secure session established
DEBUG SSLConnectionSocketFactory -  negotiated protocol: TLSv1.2
DEBUG SSLConnectionSocketFactory -  negotiated cipher suite: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
DEBUG SSLConnectionSocketFactory -  peer principal: CN=openstack, O=Ltd, L=, ST=, C=
DEBUG SSLConnectionSocketFactory -  peer alternative names: [openstack]
DEBUG SSLConnectionSocketFactory -  issuer principal: CN=  Validation CA - SHA256 - G2, O= nv-sa, C=
DEBUG DefaultHttpClientConnectionOperator - Connection established 10.32.98.39:56294<->10.6.26.9:5000
DEBUG MainClientExec - Executing request POST /v3/auth/tokens HTTP/1.1
DEBUG MainClientExec - Target auth state: UNCHALLENGED
DEBUG MainClientExec - Proxy auth state: UNCHALLENGED
DEBUG headers - http-outgoing-0 >> POST /v3/auth/tokens HTTP/1.1
DEBUG headers - http-outgoing-0 >> Content-Type: application/json
DEBUG headers - http-outgoing-0 >> OS4J-Auth-Command: Tokens
DEBUG headers - http-outgoing-0 >> Content-Length: 409
DEBUG headers - http-outgoing-0 >> Host: openstack:5000
DEBUG headers - http-outgoing-0 >> Connection: Keep-Alive
DEBUG headers - http-outgoing-0 >> User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_144)
DEBUG headers - http-outgoing-0 >> Accept-Encoding: gzip,deflate
DEBUG wire - http-outgoing-0 >> "POST /v3/auth/tokens HTTP/1.1[\r][\n]"
DEBUG wire - http-outgoing-0 >> "Content-Type: application/json[\r][\n]"
DEBUG wire - http-outgoing-0 >> "OS4J-Auth-Command: Tokens[\r][\n]"
DEBUG wire - http-outgoing-0 >> "Content-Length: 409[\r][\n]"
DEBUG wire - http-outgoing-0 >> "Host: openstack:5000[\r][\n]"
DEBUG wire - http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
DEBUG wire - http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5.3 (Java/1.8.0_144)[\r][\n]"
DEBUG wire - http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
DEBUG wire - http-outgoing-0 >> "[\r][\n]"
DEBUG wire - http-outgoing-0 >> "{[\n]"
DEBUG wire - http-outgoing-0 >> "  "auth" : {[\n]"
DEBUG wire - http-outgoing-0 >> "    "identity" : {[\n]"
DEBUG wire - http-outgoing-0 >> "      "password" : {[\n]"
DEBUG wire - http-outgoing-0 >> "        "user" : {[\n]"
DEBUG wire - http-outgoing-0 >> "          "name" : "user",[\n]"
DEBUG wire - http-outgoing-0 >> "          "domain" : {[\n]"
DEBUG wire - http-outgoing-0 >> "            "name" : "domain"[\n]"
DEBUG wire - http-outgoing-0 >> "          },[\n]"
DEBUG wire - http-outgoing-0 >> "          "password" : "password"[\n]"
DEBUG wire - http-outgoing-0 >> "        }[\n]"
DEBUG wire - http-outgoing-0 >> "      },[\n]"
DEBUG wire - http-outgoing-0 >> "      "methods" : [ "password" ][\n]"
DEBUG wire - http-outgoing-0 >> "    },[\n]"
DEBUG wire - http-outgoing-0 >> "    "scope" : {[\n]"
DEBUG wire - http-outgoing-0 >> "      "project" : {[\n]"
DEBUG wire - http-outgoing-0 >> "        "name" : "project",[\n]"
DEBUG wire - http-outgoing-0 >> "        "domain" : {[\n]"
DEBUG wire - http-outgoing-0 >> "          "name" : "domain"[\n]"
DEBUG wire - http-outgoing-0 >> "        }[\n]"
DEBUG wire - http-outgoing-0 >> "      }[\n]"
DEBUG wire - http-outgoing-0 >> "    }[\n]"
DEBUG wire - http-outgoing-0 >> "  }[\n]"
DEBUG wire - http-outgoing-0 >> "}"
DEBUG wire - http-outgoing-0 << "HTTP/1.1 201 Created[\r][\n]"
DEBUG wire - http-outgoing-0 << "Date: Fri, 09 Feb 2018 13:05:57 GMT[\r][\n]"
DEBUG wire - http-outgoing-0 << "Server: Apache/2.4.18 (Ubuntu)[\r][\n]"
DEBUG wire - http-outgoing-0 << "X-Subject-Token: gAAAAABafZy1GfJqu4_f4kfNOoVfE3BZ3ankqFx-PM_RzLvOKx8GqZCKjIid8f9ONLRN88EEP6fGWZfQe_qv92mbfyCuaCyVgZWRoFk1VUqlT7Pp3PrstNV4iv6YCMtf9ElfNQ7mY61FXnb8O25slyr92pHYBhfXZfKNT6Pvi3fK2pvI-syt-c0[\r][\n]"
DEBUG wire - http-outgoing-0 << "Vary: X-Auth-Token[\r][\n]"
DEBUG wire - http-outgoing-0 << "x-openstack-request-id: req-83f222a9-8792-4f63-9dd9-aaacd88d554d[\r][\n]"
DEBUG wire - http-outgoing-0 << "Content-Length: 8380[\r][\n]"
DEBUG wire - http-outgoing-0 << "Content-Type: application/json[\r][\n]"
DEBUG wire - http-outgoing-0 << "[\r][\n]"
DEBUG wire - http-outgoing-0 << "{"token": {"is_domain": false, "methods": ["password"], "roles": [{"id": "0f4c4c6827de4c5ca874adfe9b65858a", "name": "member"}], "expires_at": "2018-02-10T13:05:57.000000Z", "project": {"domain": {"id": "3c0dd9aaa518436da92dda4085ea56aa", "name": "domain"}, "id": "fff63a91d7bd43c089d0c5bcdf8ebd48", "name": "project"}, "catalog": [{"endpoints": [{"url": "http://192.168.2.254:8776/v1/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "admin", "region": "region", "region_id": "region", "id": "0fb15b25e51240e0b73a409ffdd5adc4"}, {"url": "http://192.168.2.254:8776/v1/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "internal", "region": "region", "region_id": "region", "id": "c7203baf01b14d2d925f24306b9d0146"}, {"url": "https://openstack:8776/v1/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "public", "region": "region", "region_id": "region", "id": "ef7df80f3b4d417486d4b3d40854a93f"}], "type": "volume", "id": "1e5138c1f3954cbea93f8970d30b7488", "name": "cinder"}, {"endpoints": [{"url": "https://openstack:8780", "interface": "public", "region": "region", "region_id": "region", "id": "588a820e7d6d46379148e3564911c7f6"}, {"url": "http://192.168.2.254:8780", "interface": "admin", "region": "region", "region_id": "region", "id": "654487fe6a7a421eac79da79ed64d887"}, {"url": "http://192.168.2.254:8780", "interface": "internal", "region": "region", "region_id": "region", "id": "c85b4a6d92074545a59739490e01e403"}], "type": "placement", "id": "26f14cf60f794be8bc125453b59682c5", "name": "placement"}, {"endpoints": [{"url": "http://192.168.2.254:5000", "interface": "internal", "region": "region", "region_id": "region", "id": "0fe23fde095f4671a885b5bc32540dbc"}, {"url": "https://openstack:5000", "interface": "public", "region": "region", "region_id": "region", "id": "4efa464f488a47f5989d0518810a8a71"}, {"url": "http://192.168.2.254:35357", "interface": "admin", "region": "region", "region_id": "region", "id": "c78055cd6f084e9f9b427556522903d9"}], "type": "identity", "id": "5a5b14aaa4a649dba019e9d1802a4b7e", "name": "keystone"}, {"endpoints": [{"url": "https://openstack:9696", "interface": "public", "region": "region", "region_id": "region", "id": "8cece661623c4b7ab8ef4cf04212a90d"}, {"url": "http://192.168.2.254:9696", "interface": "admin", "region": "region", "region_id": "region", "id": "b3c882707f1142b79dec3b33fa2af177"}, {"url": "http://192.168.2.254:9696", "interface": "internal", "region": "region", "region_id": "region", "id": "ebcbb6923e3f4d8caa00a2f2a50cf90c"}], "type": "network", "id": "5d68bb2a16374f2eb837e7e6bfc40669", "name": "neutron"}, {"endpoints": [{"url": "https://openstack:8774/v2.1/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "public", "region": "region", "region_id": "region", "id": "519e13027aae4d96901e32efa35de3fc"}, {"url": "http://192.168.2.254:8774/v2.1/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "internal", "region": "region", "region_id": "region", "id": "81a17b6cd13247c8a84241b15b627379"}, {"url": "http://192.168.2.254:8774/v2.1/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "admin", "region": "region", "region_id": "region", "id": "ce9181696b7d4142b349e6c9d4f16ef1"}], "type": "compute", "id": "71400c8dba124ae5baaf46be81d043f1", "name": "nova"}, {"endpoints": [{"url": "http://192.168.2.254:8000/v1", "interface": "admin", "region": "region", "region_id": "region", "id": "2e770acdc25d45aa99b14887049b2509"}, {"url": "https://openstack:8000/v1", "interface": "public", "region": "region", "region_id": "region", "id": "aa739b85221e4f5f811e82d28e6ce44b"}, {"url": "http://192.168.2.254:8000/v1", "interface": "internal", "region": "region", "region_id": "region", "id": "abcabb54ddaf4cffac9640b28cb30098"}], "type": "cloudformation", "id": "95c7bccb3283455db5c2065160590a20", "name": "heat-cfn"}, {"endpoints": [{"url": "http://192.168.2.254:8041", "interface": "internal", "region": "region", "region_id": "region", "id": "0adecf3f8d5742a58bf47007f9c7f722"}, {"url": "http://192.168.2.254:8041", "interface": "admin", "region": "region", "region_id": "region", "id": "9efa390a0e5441bf9c4a98b3bd545e73"}, {"url": "https://openstack:8041", "interface": "public", "region": "region", "region_id": "region", "id": "cab5179ef6074e81b001eec1a12371c5"}], "type": "metric", "id": "9c333c3d30fa45e0b672a50cd2ab77aa", "name": "gnocchi"}, {"endpoints": [{"url": "http://192.168.2.254:8776/v2/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "internal", "region": "region", "region_id": "region", "id": "ac02721c6f4b401f9ddfb0cc6469f063"}, {"url": "http://192.168.2.254:8776/v2/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "admin", "region": "region", "region_id": "region", "id": "be3a46db19ba42839a017a8cf28cd9ef"}, {"url": "https://openstack:8776/v2/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "public", "region": "region", "region_id": "region", "id": "f379c327d4ff4dea99529dfdfe305574"}], "type": "volumev2", "id": "a68644587f8248b296fc4d16bfc87ee0", "name": "cinderv2"}, {"endpoints": [{"url": "http://192.168.2.254:8774/v2/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "internal", "region": "region", "region_id": "region", "id": "6503ecadeaf449d797276d75dd9fbd34"}, {"url": "https://openstack:8774/v2/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "public", "region": "region", "region_id": "region", "id": "6bb99839cdff40c7b5dc5d75f9115ee0"}, {"url": "http://192.168.2.254:8774/v2/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "admin", "region": "region", "region_id": "region", "id": "ca09a33abdc64723bb3c220c71f8515f"}], "type": "compute_legacy", "id": "b694f4cb2d8548369ad94bf9e8b4032e", "name": "nova_legacy"}, {"endpoints": [{"url": "http://192.168.2.254:8004/v1/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "admin", "region": "region", "region_id": "region", "id": "1dd438c6839e453da3ee8f535fde2835"}, {"url": "https://openstack:8004/v1/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "public", "region": "region", "region_id": "region", "id": "8ea9f15841f14cfcb9d68f12f9e4586a"}, {"url": "http://192.168.2.254:8004/v1/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "internal", "region": "region", "region_id": "region", "id": "d39ce9a88dd6446abbca5cb79c4c1664"}], "type": "orchestration", "id": "be61fefd9e3745a8908bd3859ee9c78b", "name": "heat"}, {"endpoints": [{"url": "http://192.168.2.254:9292", "interface": "internal", "region": "region", "region_id": "region", "id": "3ca720aafd9b4b478221a08932e924cb"}, {"url": "https://openstack:9292", "interface": "public", "region": "region", "region_id": "region", "id": "5eb0ab6c44d1496799966433051ade04"}, {"url": "http://192.168.2.254:9292", "interface": "admin", "region": "region", "region_id": "region", "id": "ac5689fa1e1a4286a199433a33de5975"}], "type": "image", "id": "c5f15e15c14f424da260ba903014edec", "name": "glance"}, {"endpoints": [{"url": "http://rgw-1.mi.arm.com:7480/swift/v1", "interface": "admin", "region": "region", "region_id": "region", "id": "318b961bfd6e4779982d19c9ec3957d3"}, {"url": "http://rgw-1.mi.arm.com:7480/swift/v1", "interface": "public", "region": "region", "region_id": "region", "id": "4f0fe111b9c4425bb64d479fa6c9a8e6"}, {"url": "http://rgw-1.mi.arm.com:7480/swift/v1", "interface": "internal", "region": "region", "region_id": "region", "id": "b68efc16d667431c863215f5639792e8"}], "type": "object-store", "id": "eb27b3aaad324217b39308acb54a68a6", "name": "swift"}, {"endpoints": [{"url": "https://openstack:8776/v3/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "public", "region": "region", "region_id": "region", "id": "20a4adf24fb9469db08414d92315dbd7"}, {"url": "http://192.168.2.254:8776/v3/fff63a91d7bd43c089d0c5bcdf8ebd48", "interfac"
DEBUG headers - http-outgoing-0 << HTTP/1.1 201 Created
DEBUG headers - http-outgoing-0 << Date: Fri, 09 Feb 2018 13:05:57 GMT
DEBUG headers - http-outgoing-0 << Server: Apache/2.4.18 (Ubuntu)
DEBUG headers - http-outgoing-0 << X-Subject-Token: gAAAAABafZy1GfJqu4_f4kfNOoVfE3BZ3ankqFx-PM_RzLvOKx8GqZCKjIid8f9ONLRN88EEP6fGWZfQe_qv92mbfyCuaCyVgZWRoFk1VUqlT7Pp3PrstNV4iv6YCMtf9ElfNQ7mY61FXnb8O25slyr92pHYBhfXZfKNT6Pvi3fK2pvI-syt-c0
DEBUG headers - http-outgoing-0 << Vary: X-Auth-Token
DEBUG headers - http-outgoing-0 << x-openstack-request-id: req-83f222a9-8792-4f63-9dd9-aaacd88d554d
DEBUG headers - http-outgoing-0 << Content-Length: 8380
DEBUG headers - http-outgoing-0 << Content-Type: application/json
DEBUG MainClientExec - Connection can be kept alive indefinitely
DEBUG wire - http-outgoing-0 << "e": "internal", "region": "region", "region_id": "region", "id": "37b2fc14a8a74a9582352ece0f19ca87"}, {"url": "http://192.168.2.254:8776/v3/fff63a91d7bd43c089d0c5bcdf8ebd48", "interface": "admin", "region": "region", "region_id": "region", "id": "b13c41f86d8245c1850a0ff0de40b4c6"}], "type": "volumev3", "id": "f2cb4dbc6703463aa17c805f6eb96e47", "name": "cinderv3"}], "user": {"password_expires_at": null, "domain": {"id": "3c0dd9aaa518436da92dda4085ea56aa", "name": "domain"}, "id": "2b3268f48a024010a1e66510c27042c8", "name": "user"}, "audit_ids": ["0FE9Jcz6Tga5PfwAWl5_ow"], "issued_at": "2018-02-09T13:05:57.000000Z"}}"
DEBUG PoolingHttpClientConnectionManager - Connection [id: 0][route: {s}->https://openstack:5000] can be kept alive indefinitely
DEBUG PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {s}->https://openstack:5000][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
DEBUG i18n - Interceptor Context: org.jboss.resteasy.core.interception.jaxrs.ClientReaderInterceptorContext,  Method : proceed
DEBUG i18n - MessageBodyReader: org.jboss.resteasy.spi.ResteasyProviderFactory$SortedKey
DEBUG i18n - MessageBodyReader: com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider
DEBUG PoolingHttpClientConnectionManager - Connection manager is shutting down
DEBUG DefaultManagedHttpClientConnection - http-outgoing-0: Close connection
DEBUG PoolingHttpClientConnectionManager - Connection manager shut down
DEBUG HttpExecutor - Executing Request: https://openstack:9696/v2.0 -> /networks/
DEBUG RequestAddCookies - CookieSpec selected: default
DEBUG RequestAuthCache - Auth cache not set in the context
DEBUG PoolingHttpClientConnectionManager - Connection request: [route: {s}->https://openstack:9696][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20]
DEBUG PoolingHttpClientConnectionManager - Connection leased: [id: 1][route: {s}->https://openstack:9696][total kept alive: 0; route allocated: 1 of 2; total allocated: 1 of 20]
DEBUG MainClientExec - Opening connection {s}->https://openstack:9696
DEBUG DefaultHttpClientConnectionOperator - Connecting to openstack/10.6.26.9:9696
DEBUG SSLConnectionSocketFactory - Connecting socket to openstack/10.6.26.9:9696 with timeout 0
DEBUG SSLConnectionSocketFactory - Enabled protocols: [TLSv1, TLSv1.1, TLSv1.2]
DEBUG SSLConnectionSocketFactory - Enabled cipher suites:[TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
DEBUG SSLConnectionSocketFactory - Starting handshake
DEBUG SSLConnectionSocketFactory - Secure session established
DEBUG SSLConnectionSocketFactory -  negotiated protocol: TLSv1.2
DEBUG SSLConnectionSocketFactory -  negotiated cipher suite: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
DEBUG SSLConnectionSocketFactory -  peer principal: CN=openstack, O=Ltd, L=, ST=, C=
DEBUG SSLConnectionSocketFactory -  peer alternative names: [openstack]
DEBUG SSLConnectionSocketFactory -  issuer principal: CN= Organization Validation CA - SHA256 - G2, O= nv-sa, C=
DEBUG DefaultHttpClientConnectionOperator - Connection established 10.32.98.39:56295<->10.6.26.9:9696
DEBUG MainClientExec - Executing request GET /v2.0/networks/ HTTP/1.1
DEBUG MainClientExec - Target auth state: UNCHALLENGED
DEBUG MainClientExec - Proxy auth state: UNCHALLENGED
DEBUG headers - http-outgoing-1 >> GET /v2.0/networks/ HTTP/1.1
DEBUG headers - http-outgoing-1 >> User-Agent: OpenStack4j / OpenStack Client
DEBUG headers - http-outgoing-1 >> X-Auth-Token: gAAAAABafZy1GfJqu4_f4kfNOoVfE3BZ3ankqFx-PM_RzLvOKx8GqZCKjIid8f9ONLRN88EEP6fGWZfQe_qv92mbfyCuaCyVgZWRoFk1VUqlT7Pp3PrstNV4iv6YCMtf9ElfNQ7mY61FXnb8O25slyr92pHYBhfXZfKNT6Pvi3fK2pvI-syt-c0
DEBUG headers - http-outgoing-1 >> Host: openstack:9696
DEBUG headers - http-outgoing-1 >> Connection: Keep-Alive
DEBUG headers - http-outgoing-1 >> Accept-Encoding: gzip,deflate
DEBUG wire - http-outgoing-1 >> "GET /v2.0/networks/ HTTP/1.1[\r][\n]"
DEBUG wire - http-outgoing-1 >> "User-Agent: OpenStack4j / OpenStack Client[\r][\n]"
DEBUG wire - http-outgoing-1 >> "X-Auth-Token: gAAAAABafZy1GfJqu4_f4kfNOoVfE3BZ3ankqFx-PM_RzLvOKx8GqZCKjIid8f9ONLRN88EEP6fGWZfQe_qv92mbfyCuaCyVgZWRoFk1VUqlT7Pp3PrstNV4iv6YCMtf9ElfNQ7mY61FXnb8O25slyr92pHYBhfXZfKNT6Pvi3fK2pvI-syt-c0[\r][\n]"
DEBUG wire - http-outgoing-1 >> "Host: openstack:9696[\r][\n]"
DEBUG wire - http-outgoing-1 >> "Connection: Keep-Alive[\r][\n]"
DEBUG wire - http-outgoing-1 >> "Accept-Encoding: gzip,deflate[\r][\n]"
DEBUG wire - http-outgoing-1 >> "[\r][\n]"
DEBUG wire - http-outgoing-1 << "HTTP/1.1 200 OK[\r][\n]"
DEBUG wire - http-outgoing-1 << "Content-Type: application/json[\r][\n]"
DEBUG wire - http-outgoing-1 << "Content-Length: 2441[\r][\n]"
DEBUG wire - http-outgoing-1 << "X-Openstack-Request-Id: req-c19d6714-c9fa-438f-ab24-6fe51a323012[\r][\n]"
DEBUG wire - http-outgoing-1 << "Date: Fri, 09 Feb 2018 13:05:58 GMT[\r][\n]"
DEBUG wire - http-outgoing-1 << "[\r][\n]"
DEBUG wire - http-outgoing-1 << "{"networks":[{"updated_at":"2018-01-31T08:44:58Z","dns_domain":"","revision_number":9,"port_security_enabled":true,"id":"19576d0f-9e2f-43ce-ab2d-182f73998c5d","router:external":true,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"2b21740906894aaa908a8a443943aaf8","status":"ACTIVE","subnets":["8857b71d-52ae-4e0e-a72c-7ac1dcd78425"],"description":"","tags":[],"ipv6_address_scope":null,"is_default":false,"qos_policy_id":null,"name":"external","admin_state_up":true,"tenant_id":"2b21740906894aaa908a8a443943aaf8","created_at":"2018-01-18T11:19:44Z","mtu":1500},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"dd477cb7-ae97-41da-a8f7-55b25062b83d","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["bd5be583-2d72-4fa9-8b01-802f66f72caa"],"description":"","tags":[],"updated_at":"2018-01-18T11:51:08Z","qos_policy_id":null,"name":"internal","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-01-18T11:51:07Z","mtu":1450},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"e510a7fc-042b-4cde-8213-c493d3c83ed5","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["3c35c4da-47a1-44cd-9cd5-2f9abc1f484d"],"description":"","tags":[],"updated_at":"2018-02-05T10:22:47Z","qos_policy_id":null,"name":"joes-shift-on-stack","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-02-05T10:22:25Z","mtu":1450},{"ipv6_address_scope":null,"dns_domain":"","revision_number":4,"port_security_enabled":true,"id":"fe312c1c-9d05-4ca9-8158-b9792f9e4917","router:external":false,"availability_zone_hints":[],"availability_zones":["x86_64"],"ipv4_address_scope":null,"shared":false,"project_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","status":"ACTIVE","subnets":["4a3fdae2-1f75-475e-a681-d89cdef07f14"],"description":"","tags":[],"updated_at":"2018-02-08T09:50:47Z","qos_policy_id":null,"name":"shift_on_stack","admin_state_up":true,"tenant_id":"fff63a91d7bd43c089d0c5bcdf8ebd48","created_at":"2018-02-08T09:50:36Z","mtu":8750}]}"
DEBUG headers - http-outgoing-1 << HTTP/1.1 200 OK
DEBUG headers - http-outgoing-1 << Content-Type: application/json
DEBUG headers - http-outgoing-1 << Content-Length: 2441
DEBUG headers - http-outgoing-1 << X-Openstack-Request-Id: req-c19d6714-c9fa-438f-ab24-6fe51a323012
DEBUG headers - http-outgoing-1 << Date: Fri, 09 Feb 2018 13:05:58 GMT
DEBUG MainClientExec - Connection can be kept alive indefinitely
DEBUG PoolingHttpClientConnectionManager - Connection [id: 1][route: {s}->https://openstack:9696] can be kept alive indefinitely
DEBUG PoolingHttpClientConnectionManager - Connection released: [id: 1][route: {s}->https://openstack:9696][total kept alive: 1; route allocated: 1 of 2; total allocated: 1 of 20]
DEBUG i18n - Interceptor Context: org.jboss.resteasy.core.interception.jaxrs.ClientReaderInterceptorContext,  Method : proceed
DEBUG i18n - MessageBodyReader: org.jboss.resteasy.spi.ResteasyProviderFactory$SortedKey
DEBUG i18n - MessageBodyReader: com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider
Exception in thread "main" javax.ws.rs.ProcessingException: com.fasterxml.jackson.databind.JsonMappingException: Root name 'networks' does not match expected ('network') for type [simple type, class org.openstack4j.openstack.networking.domain.NeutronNetwork]
 at [Source: java.io.ByteArrayInputStream@79c7532f; line: 1, column: 2]
    at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:300)
    at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readEntity(ClientResponse.java:196)
    at org.jboss.resteasy.specimpl.BuiltResponse.readEntity(BuiltResponse.java:218)
    at org.openstack4j.connectors.resteasy.HttpResponseImpl.readEntity(HttpResponseImpl.java:118)
    at org.openstack4j.core.transport.HttpEntityHandler.handle(HttpEntityHandler.java:66)
    at org.openstack4j.connectors.resteasy.HttpResponseImpl.getEntity(HttpResponseImpl.java:64)
    at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:225)
    at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:207)
    at org.openstack4j.openstack.networking.internal.NetworkServiceImpl.get(NetworkServiceImpl.java:65)
    at com.mycompany.app.App.main(App.java:32)
Caused by: com.fasterxml.jackson.databind.JsonMappingException: Root name 'networks' does not match expected ('network') for type [simple type, class org.openstack4j.openstack.networking.domain.NeutronNetwork]
 at [Source: java.io.ByteArrayInputStream@79c7532f; line: 1, column: 2]
    at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:216)
    at com.fasterxml.jackson.databind.ObjectReader._unwrapAndDeserialize(ObjectReader.java:1648)
    at com.fasterxml.jackson.databind.ObjectReader._bind(ObjectReader.java:1531)
    at com.fasterxml.jackson.databind.ObjectReader.readValue(ObjectReader.java:944)
    at com.fasterxml.jackson.jaxrs.base.ProviderBase.readFrom(ProviderBase.java:811)
    at org.jboss.resteasy.core.interception.jaxrs.AbstractReaderInterceptorContext.readFrom(AbstractReaderInterceptorContext.java:66)
    at org.jboss.resteasy.core.interception.jaxrs.AbstractReaderInterceptorContext.proceed(AbstractReaderInterceptorContext.java:56)
    at org.jboss.resteasy.client.jaxrs.internal.ClientResponse.readFrom(ClientResponse.java:266)
    ... 9 more
Chekov2k commented 6 years ago

Interestingly, if I replace:

client.networking().network().get("");

with

client.networking().network().list().size();

it works

auhlig commented 6 years ago

Thanks for investigating @Chekov2k. I guess the network service was written for an older version and compatibility cannot be guaranteed for newer ones. But you can always contribute ;)

Chekov2k commented 6 years ago

Fixed in the Jenkins plugin