Giter Club home page Giter Club logo

jlxd's People

Contributors

zeridon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jlxd's Issues

Couple issues of the API

Hello, Im working on a project with your API. I dont know if youre still active on here but I found some issues you might want to resolve.

  1. Solution to Cannot create container from existing image (ILxdApiService):
    You are missing closing brackets and single quotation mark in "public static final String URL_POST_CONTAINER_CREATE_LOCAL"

  2. When LXD is installed with snap (current practice) the unix.socket has a different path (ILxdApiService):
    It is in /var/snap/lxd/common/lxd/unix.socket instead of /var/lib/lxd/unix.socket

  3. The certificates for remote connection have a different path as well, when installed with snap (needs to be changed in LxdConstants.java):
    The certificate: /snap/lxd/common/config/client.crt
    The key: /snap/lxd/common/config/client.key

  4. In the RemoteServer.java change the name ob UBUNTU.enum to "ubuntu" instead of "ububtu"
    Just a typo.

Can't get even the example projects to work

Maybe I am missing something, but I cannot get the library (or even jlxd-cli) to work. I do not get any errors, everything looks to work fine, but nothing actually happens.

ILxdService api = new LxdServiceImpl();
ILxdApiService lxdApiService = new LxdApiServiceImpl();
ILinuxCliService linuxCliService = new LinuxCliServiceImpl();
lxdApiService.setLinuxCliService(linuxCliService);
api.setLxdApiService(lxdApiService);

api.createContainer("container_name", "images:alpine/edge");

outputs

2017-10-28 14:54:19 INFO  LxdApiServiceImpl:324 - repsonse=OperationResponse: type=async, status=Operation created, statusCode=100, metadata=Operation{id='326d330a-c190-4c29-b6b4-28c55cda92df', classType='task', createdDate='2017-10-28T14:54:19.26748073+03:00', updatedDate='2017-10-28T14:54:19.26748073+03:00', status='Running', statusCode='103', resources='{containers=[/1.0/containers/327592088315363328]}', metadata='null', mayCancel='null', err=''}, error=, errorCode=0

, but nothing happens (container should show up when doing lxc list)

any further operations (like api.startContainer("container_name");) causes an error with

java.lang.IllegalArgumentException: container: container_name has state null
	at au.com.jcloud.lxd.service.impl.LxdServiceImpl.changeContainerState(LxdServiceImpl.java:125)
	at au.com.jcloud.lxd.service.impl.LxdServiceImpl.startContainer(LxdServiceImpl.java:141)

And as earlier stated, even example project Jlxd-cli fails to work. No errors, just nothing happens. Strangely enough, the webapp Jlxd-ui works fine, but I can't figure out why.

Any assistance?

System info:
Lxd version: 2.18
Ubuntu version: 17.10

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.