Skip to content
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

neutron attach and detach network to agent dhcp #1082

Merged
merged 3 commits into from
Oct 10, 2018

Conversation

rafael-bertoli
Copy link

I can't do attach test because the request return null and break test with resteasy provider

Copy link
Member

@auhlig auhlig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many thanks @rafael-bertoli.
Why does it fail with resteasy? Can you share the link to the respective neutron API doc?

import org.testng.Reporter;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertNotNull;
import static org.testng.Assert.assertTrue;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please re-arrange the imports?

@rafael-bertoli
Copy link
Author

Hi @auhlig,
this is the neutron doc https://specs.openstack.org/openstack/neutron-specs/specs/api/agent_schedulers.html#schedule-network-to-dhcp-agent.

When i do this test, build failed

@Test
    public void attachNetworkToDhcpAgent() throws Exception {
        respondWith(201);
        ActionResponse result = osv3().networking().agent().attachNetworkToDhcpAgent("190ecbc2-77e0-4e4f-a96b-aa849edb357b", "4e8e5957-649f-477b-9e5b-f1f75b21c03c");
        server.takeRequest();
        assertTrue(result.isSuccess());
    }
attachNetworkToDhcpAgent(org.openstack4j.api.network.NetworkTests)  Time elapsed: 0.013 sec  <<< FAILURE!
org.openstack4j.api.exceptions.ConnectionException: could not find writer for content-type application/json type: java.lang.String
	at org.jboss.resteasy.client.ClientRequest.writeRequestBody(ClientRequest.java:470)
	at org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor.writeRequestBodyToOutputStream(ApacheHttpClient4Executor.java:393)
	at org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor.buildEntity(ApacheHttpClient4Executor.java:360)
	at org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor.loadHttpMethod(ApacheHttpClient4Executor.java:332)
	at org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor.execute(ApacheHttpClient4Executor.java:180)
	at org.jboss.resteasy.client.ClientRequest.execute(ClientRequest.java:438)
	at org.jboss.resteasy.client.ClientRequest.httpMethod(ClientRequest.java:688)
	at org.jboss.resteasy.client.ClientRequest.httpMethod(ClientRequest.java:694)
	at org.openstack4j.connectors.resteasy.HttpCommand.execute(HttpCommand.java:65)
	at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.invokeRequest(HttpExecutorServiceImpl.java:61)
	at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.invoke(HttpExecutorServiceImpl.java:54)
	at org.openstack4j.connectors.resteasy.HttpExecutorServiceImpl.execute(HttpExecutorServiceImpl.java:30)
	at org.openstack4j.core.transport.internal.HttpExecutor.execute(HttpExecutor.java:51)
	at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:213)
	at org.openstack4j.openstack.networking.internal.ext.AgentServiceImpl.attachNetworkToDhcpAgent(AgentServiceImpl.java:44)
	at org.openstack4j.api.network.NetworkTests.attachNetworkToDhcpAgent(NetworkTests.java:97)

@auhlig auhlig added this to the 3.1.1 Release milestone Sep 22, 2017
@vinodborole vinodborole merged commit 9f0eeb3 into ContainX:master Oct 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants