GithubHelp home page GithubHelp logo

openstack-java-sdk's People

Stargazers

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

Watchers

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

openstack-java-sdk's Issues

Issue with swift, please help

Hi,

I'm using the swift-client and swift-model part of the SDK and am stuck as container show() is not working as desired. Here is our code snippet at the caller:

container = swift.containers().show(driveName).execute();

However, looking at ContainersResource.java, we found:

            public Show(String containerName) {

// return target.path(containerName).request(MediaType.APPLICATION_JSON).head();
}

Changing this to something similar as ServersResource.java gets me into an exception as below:

    public class Show extends OpenStackRequest<Container> {

            private String containerName;

            public Show(String containerName) {
                    super(CLIENT, HttpMethod.GET, new StringBuilder("/").append(containerName), null, Container.class);
            }

    }

However, I get the exception:
com.sun.jersey.api.client.ClientHandlerException: org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of com.woorea.openstack.swift.model.Containers out of START_ARRAY token

Enabling logs in catalina.out, I found that we are receiving the response as a JSON array for swift:
[{"count": 1, "bytes": 3968, "name": "mdic-cache-1"}]

Note, this is an array, when things are something like what Nova returns, the ServersResource works fine I guess..

{"servers": [{"status": "ERROR", ....... }]}

Is a fix available so that I can use swift from the openstack SDK? Please help, I'm stuck..

nova server list openstack.connector error

Hi everyone, i am new user openstack and java api. I try to see my nova list with using woorea example. but i take this error;

Exception in thread "main" java.util.ServiceConfigurationError: com.woorea.openstack.base.client.OpenStackClientConnector: Provider com.woorea.openstack.connector.JaxRs20Connector could not be instantiated: java.lang.ClassFormatError: Absent Code attribute in method that is not native or abstract in class file javax/ws/rs/WebApplicationException
i didnt solve, please help

Failed to add user to tenant.

Hello, as the title mentioned, I used the nova client to add a user to my created tenant, and just failed because the jersey client that the sdk used demand the entity to be none-null for put request. This interface do not need an entity at all as in your code. while the request cannot just pass the check of the jersey client. Do you mind having a look at this? Thanks!

private void validateHttpMethodAndEntity(ClientRequest request) {
    final String method = request.getMethod();

    final EntityPresence entityPresence = METHODS.get(method.toUpperCase());
    if (entityPresence == EntityPresence.MUST_BE_NULL && request.hasEntity()) {
        throw new IllegalStateException(LocalizationMessages.ERROR_HTTP_METHOD_ENTITY_NOT_NULL(method));
    } else if (entityPresence == EntityPresence.MUST_BE_PRESENT && !request.hasEntity()) {
        throw new IllegalStateException(LocalizationMessages.ERROR_HTTP_METHOD_ENTITY_NULL(method));
    }
}

ServerForCreate class missing the "networks" field

There does not seem to be a way to assign a network to a server on creation in v3.2.1. This is the part of the JSON request that I'm referring to:

    "networks" : [ {
      "uuid" : "a510ffb7-0325-4d4d-a295-452ea51015b7"
    } ],

I've managed to fix this locally by updating the model package to add a new Class called NetworkForCreate that contains only an did and fixedIp field. I then modified the ServerForCreate class and added a new List field called "networks".

exc.UnrecognizedPropertyException: RAX-AUTH:authenticatedBy

Hi,
I am trying to get the project going for several hours now against rackspace. I finally came to the point, where I am not able to proceed. I get the exception below:

Caused by: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "RAX-AUTH:authenticatedBy" (Class com.woorea.openstack.keystone.model.Token), not marked as ignorable
 at [Source: org.glassfish.jersey.message.internal.EntityInputStream@6ebcf58a; line: 1, column: 176] (through reference chain: com.woorea.openstack.keystone.model.Access["token"]->com.woorea.openstack.keystone.model.Token["RAX-AUTH:authenticatedBy"])

The reason seems to be that, Rackspace is using some properties, which are not declared in Access.java:

"token":{
         "id":"xxx56x756x56x56x56x",
         "expires":"2013-07-29T14:15:56.244-05:00",
         "tenant":{
            "id":"xxxxxx",
            "name":"xxxxxx"
         },
         "RAX-AUTH:authenticatedBy":[
            "PASSWORD"
         ]
      },

How can I deal with something like that? Is this a break in the Openstack standardization objectives?

Would be glad, if you could give me a hint,

Thanks Johannes

Openstack-java-sdk 3.2.2-SNAPSHOT incompatible with OpenStack 2013.2 (Havana)

When you try execute example NovaListServers from openstack-java-sdk 3.2.2-SNAPSHOT where endpoint configuration is set on OpenStack 2013.2 (Havana) version of openstack you will get exception:

org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "OS-SRV-USG:launched_at" (Class com.woorea.openstack.nova.model.Server), not marked as ignorable
at [Source: org.glassfish.jersey.message.internal.EntityInputStream@559b808a; line: 1, column: 1877](through reference chain: com.woorea.openstack.nova.model.Servers["servers"]->com.woorea.openstack.nova.model.Server["OS-SRV-USG:launched_at"])

New version of openstack api has new fields in response:
OS-SRV-USG:launched_at
OS-SRV-USG:terminated_at
os-extended-volumes:volumes_attached

but Server class doesn't have this fields

getVncConsole

Hi,

This is more of a question, as i might be doing something wrong. I'm trying to find the URL to the VNC console (its available in horizon...) I am doing the following:

novaClient.servers().getVncConsole( server.getId(), "novnc" ).execute();

but i'm getting the content type
{
"os-getVNCConsole" : {
}
}

and as a result

{"badRequest": {"message": "Invalid console type None", "code": 400}}

I was wondering if anyone have come across this?

Thanks,

UnrecognizedPropertyException: Unrecognized field "extra" when updating

When updating user via the java sdk, keystone returns the user having populated an extra field called "extra", for which the json API does not find a correspondent in the User class and throws an exception:

Nov 01, 2013 10:59:53 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [jsp] in context with path [] threw exception [com.sun.jersey.api.client.ClientHandlerException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "extra" (Class com.woorea.openstack.keystone.model.User), not marked as ignorable
at [Source: java.io.ByteArrayInputStream@3a23fcd2; line: 1, column: 66](through reference chain: com.woorea.openstack.keystone.model.User["extra"])] with root cause
org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "extra" (Class com.woorea.openstack.keystone.model.User), not marked as ignorable
at [Source: java.io.ByteArrayInputStream@3a23fcd2; line: 1, column: 66](through reference chain: com.woorea.openstack.keystone.model.User["extra"])
at org.codehaus.jackson.map.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:53)
at org.codehaus.jackson.map.deser.StdDeserializationContext.unknownFieldException(StdDeserializationContext.java:267)
at org.codehaus.jackson.map.deser.std.StdDeserializer.reportUnknownProperty(StdDeserializer.java:673)
at org.codehaus.jackson.map.deser.std.StdDeserializer.handleUnknownProperty(StdDeserializer.java:659)
at org.codehaus.jackson.map.deser.BeanDeserializer.handleUnknownProperty(BeanDeserializer.java:1365)
at org.codehaus.jackson.map.deser.BeanDeserializer._handleUnknown(BeanDeserializer.java:725)
at org.codehaus.jackson.map.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:703)
at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:580)
at org.codehaus.jackson.map.ObjectMapper._unwrapAndDeserialize(ObjectMapper.java:2802)
at org.codehaus.jackson.map.ObjectMapper._readValue(ObjectMapper.java:2702)
at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1315)
at org.codehaus.jackson.jaxrs.JacksonJsonProvider.readFrom(JacksonJsonProvider.java:398)
at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:565)
at com.sun.jersey.api.client.ClientResponse.getEntity(ClientResponse.java:517)
at com.woorea.openstack.connector.JerseyResponse.getEntity(JerseyResponse.java:26)
at com.woorea.openstack.base.client.OpenStackClient.execute(OpenStackClient.java:67)
at com.woorea.openstack.base.client.OpenStackRequest.execute(OpenStackRequest.java:98)

This happened while trying to update only the password for the user, therefore I called a show first on the user then modified the password and then performed the update. The update is executed correctly but the code fails on the response deserialization.

Create tag for RC3 and version management

The last stable/essex tag is from 8 months ago. Since this time there have been some changes and a new tag (RC3) would be great.

Do you think so?

Additionally, master branch should have 2.x in pom.xml, because it breaks backward compatibility with stable/essex branch (1.x).

So, my proposal is:

  • Make master 2.x and produce tags like 2.1, 2.2, 2.3, etc
  • Maintain stable/essex as 1.x and produce tags like 1.0, 1.1, 1.2, etc
  • Release 1.0-RC3 (tag)

My 2 cents,
Antonio.

NetworksResource networks list has a bug.

it seems the method "list" not init parameter"client", i modify it like that, it works:

           public List() {
  •       method(HttpMethod.GET);
    
  •       path("networks");
    
  •       header("Accept", "application/json");
    
  •       returnType(Networks.class);
    
  •       super(CLIENT, HttpMethod.GET, "/networks", null, Networks.class);
    }
    

ACLs on containers and metadata on objects

There doesn't appear to be a built-in way to set the X-Container-Read/Write header on the containers for ACL control.
Also, there doesn't appear to be a way to set X-Object-Meta headers on objects.
Am I missing something?

resteasy-connector has a bug.

If a response code is ACCEPTED, resteasy-connector throws an exception.
I saw this bug when I was creating a server.
After adding a condition that checks whether the response code is ACCEPTED to the if statement as a following patch, this bug was disappeared.

--- /Users/widepis/RESTEasyConnector.java 2013-05-20 17:11:18.000000000 +0900
+++ RESTEasyConnector.java 2013-05-20 16:44:28.000000000 +0900
@@ -82,7 +82,8 @@
}

    if (response.getStatus() == HttpStatus.SC_OK
  •                   || response.getStatus() == HttpStatus.SC_NO_CONTENT) {
    
  •                   || response.getStatus() == HttpStatus.SC_NO_CONTENT
    
  •                   || response.getStatus() == HttpStatus.SC_ACCEPTED ) {
            return response.getEntity(request.returnType());
    }
    

mvn repository

Hi,

I was wondering if it's an issue i'm facing or its just the repository being out of date or something, i've clonned the master, and doing mvn dependency:copy-dependencies fails.

Regards,
Armin

Make openstack-java-sdk work in jboss 7

At the moment it's not possible to use openstack-java-sdk with jboss 7 for a dependency conflict between jax-rs 1 and jax-rs 2.

It would be great to remove such dependency (if not strictly needed) and make all the additional changes required to make it work in jboss.

JsonMappingException when editing user roles

This piece of code makes a request to the users endpoint:

KeystoneUser ksu = new KeystoneUser();
ksu.setRoles(roles); // roles is a list of org.openstack.model.identity.Role
ksu = (KeystoneUser) identity.users().user(ksu.getId()).put(ksu);

The identity server is producing a response which contains an "extra" attribute (JSON) like this:

"extra": {
    "roles": [{
            "id": "698cc70cc0ee4bf18e609e6cdd7caf96"
    }]
}

This response does not match with KeystoneUser "extra" attr:

@JsonProperty
private Map<String, String> extra;

because "extra" contains an array and it can not be mapped into a String.

Full exception log:

Grave: Error reading entity from input stream
org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.lang.String out of START_ARRAY token
 at [Source: java.io.ByteArrayInputStream@76a25ccd; line: 1, column: 287] (through reference chain: org.openstack.model.identity.keystone.KeystoneUser["extra"])

openstack ui

hi is there any detail information on hoe to use openstack ui . i am not so famalier with maven and also not a good java programmer but i have downloaded code and try to figure it out still find some difficulty in dealing with. how can i start and use your ui further is it possible to change endpoint url , master sercer username and password so that i can test it in my local machine. it is only mention in properties file we can make a change so in accordance to that where should i amke change. sorry i am not java expert if my question annoy you
regards
sanjaya

uploading Object

after uploading any object , I discover when I download it that it has got only one Byte as size
that's why it's inaccessible

Nova server actions missing: "live migrate" (and "migrate")

Put: v2/​{tenant_id}​/servers/​{server_id}​/action

{
    "os-migrateLive": {
        "host": "0443e9a1254044d8b99f35eace132080",
        "block_migration": false,
        "disk_over_commit": false
    }
}

Live-migrates a server to a new host without rebooting.

Potential memory leak

If you create a SwiftClient with a token, a new listener will be added added to OpenStack.CLIENT.listeners collection for every call to SwiftClient.execute. This listener is never popped out the collection and, therefore, a garbage collector or heap space exception will raise eventually.

public class SwiftClient extends AbstractOpenStackClient {

    public SwiftClient(String endpointURL, String token) {
        super(endpointURL, token);
    }

    public <R> R execute(SwiftCommand<R> command) {
        WebTarget endpoint = OpenStack.CLIENT.target(endpointURL);
        if(token != null) {
            endpoint.register(tokenFilter);
        }
        return command.execute(endpoint);
    }

}

There is no way to remove the listener once it has been added. The only available option is to create a new JerseyClient.

ServerForCreate max and min dont work

Hi,
The setMax and setMin property dont create multiple instances even though the grizzly installs supports it. I think the json property should max_count and min_count which seems to work for me. If its okay and someone can verify , I can fork and patch this.

Thanks

KeystoneTokenProvider is not checking for token expiration.

Each token has an expire date, so token provider must check if the current token is expired or not.

this code in KeystoneTokenProvider:

public Access getAccessByTenant(String tenantName) {
        Access access = hashTenantAccess.get(tenantName);
        if (access == null) {  
            //code omitted. (request for new token)
        }
        return access;
}

must be something like:

public Access getAccessByTenant(String tenantName) {
        Access access = hashTenantAccess.get(tenantName);
        if (access == null  || Calendar.getInstance().after(access.getToken().getExpires())) {  
                       //code omitted. (request for new token)
        }
        return access;
}

Access token and extension fix

There is a new field named "issued_at" which was introduced to the new version of Openstack Keystone. This is a quick patch, including this change and fix for extension listing (sorry for the code auto format differences)

From c5444515140dd50f941d16a6ffec0886dc095e30 Mon Sep 17 00:00:00 2001
From: Nam <zang_kaist.ac.kr>
Date: Dec 3, 2012 9:08:00 PM

fixing extension listing and update keystone access model to reflect new
"issued_at" property added to openstack

diff --git a/keystone-model/src/main/java/org/openstack/keystone/model/Access.java b/keystone-model/src/main/java/org/openstack/keystone/model/Access.java
index 02af5f6..63883d1 100644
--- a/keystone-model/src/main/java/org/openstack/keystone/model/Access.java
+++ b/keystone-model/src/main/java/org/openstack/keystone/model/Access.java
@@ -12,332 +12,309 @@
@JsonRootName("access")
public class Access implements Serializable {

- public static final class Token {

- public static final class Tenant {

- private String id;

- private String name;

- private String description;

  •       private Boolean enabled;
    
  • public static final class Token {
  •       /**
    
  •        \* @return the id
    
  •        */
    
  •       public String getId() {
    
  •           return id;
    
  •       }
    
  • public static final class Tenant {
  •       /**
    
  •        \* @return the name
    
  •        */
    
  •       public String getName() {
    
  •           return name;
    
  •       }
    
  •  private String id;
    
  •  private String name;
    
  •  private String description;
    
  •  private Boolean enabled;
    
  •       /**
    
  •        \* @return the description
    
  •        */
    
  •       public String getDescription() {
    
  •           return description;
    
  •       }
    
  •  /**
    
  •   \* @return the id
    
  •   */
    
  •  public String getId() {
    
  •    return id;
    
  •  }
    
  •       /**
    
  •        \* @return the enabled
    
  •        */
    
  •       public Boolean getEnabled() {
    
  •           return enabled;
    
  •       }
    
  •  /**
    
  •   \* @return the name
    
  •   */
    
  •  public String getName() {
    
  •    return name;
    
  •  }
    
  •       /* (non-Javadoc)
    
  •        \* @see java.lang.Object#toString()
    
  •        */
    
  •       @Override
    
  •       public String toString() {
    
  •           return "Tenant [id=" + id + ", name=" + name + ", description="
    
  •                   + description + ", enabled=" + enabled + "]";
    

- }

- }

- private String id;

- private Calendar expires;

  •   private Tenant tenant;
    
  •  /**
    
  •   \* @return the description
    
  •   */
    
  •  public String getDescription() {
    
  •    return description;
    
  •  }
    
  •   /**
    
  •    \* @return the id
    
  •    */
    
  •   public String getId() {
    
  •       return id;
    
  •   }
    
  •  /**
    
  •   \* @return the enabled
    
  •   */
    
  •  public Boolean getEnabled() {
    
  •    return enabled;
    
  •  }
    
  •   /**
    
  •    \* @return the expires
    
  •    */
    
  •   public Calendar getExpires() {
    
  •       return expires;
    
  •   }
    
  •  /*
    
  •   \* (non-Javadoc) @see java.lang.Object#toString()
    
  •   */
    
  •  @Override
    
  •  public String toString() {
    
  •    return "Tenant [id=" + id + ", name=" + name + ", description="
    
  •            + description + ", enabled=" + enabled + "]";
    
  •  }
    
  • }
  • private String id;
  • private Calendar issued_at;
  • private Calendar expires;
  • private Tenant tenant;
  •   /**
    
  •    \* @return the tenant
    
  •    */
    
  •   public Tenant getTenant() {
    
  •       return tenant;
    
  •   }
    
  • /**
  • \* @return the id
    
  • */
    
  • public String getId() {
  •  return id;
    
  • }
  •   /* (non-Javadoc)
    
  •    \* @see java.lang.Object#toString()
    
  •    */
    
  •   @Override
    
  •   public String toString() {
    
  •       return "Token [id=" + id + ", expires=" + expires + ", tenant="
    
  •               + tenant + "]";
    

- }

- }

- public static final class Service {

  •   @JsonIgnoreProperties(ignoreUnknown=true)
    

- public static final class Endpoint {

- private String region;

- private String publicURL;

- private String internalURL;

  •       private String adminURL;
    
  • /**
  • \* @return the expires
    
  • */
    
  • public Calendar getIssued_at() {
  •  return issued_at;
    
  • }
  •       /**
    
  •        \* @return the region
    
  •        */
    
  •       public String getRegion() {
    
  •           return region;
    
  •       }
    
  • /**
  • \* @return the expires
    
  • */
    
  • public Calendar getExpires() {
  •  return expires;
    
  • }
  •       /**
    
  •        \* @return the publicURL
    
  •        */
    
  •       public String getPublicURL() {
    
  •           return publicURL;
    
  •       }
    
  • /**
  • \* @return the tenant
    
  • */
    
  • public Tenant getTenant() {
  •  return tenant;
    
  • }
  •       /**
    
  •        \* @return the internalURL
    
  •        */
    
  •       public String getInternalURL() {
    
  •           return internalURL;
    
  •       }
    
  • /*
  • \* (non-Javadoc) @see java.lang.Object#toString()
    
  • */
    
  • @OverRide
  • public String toString() {
  •  return "Token [id=" + id + ", Issued_at=" + issued_at + ", expires=" + expires + ", tenant="
    
  •          + tenant + "]";
    
  • }
  • }
  •       /**
    
  •        \* @return the adminURL
    
  •        */
    
  •       public String getAdminURL() {
    
  •           return adminURL;
    
  •       }
    
  • public static final class Service {
  •       /* (non-Javadoc)
    
  •        \* @see java.lang.Object#toString()
    
  •        */
    
  •       @Override
    
  •       public String toString() {
    
  •           return "Endpoint [region=" + region + ", publicURL="
    
  •                   + publicURL + ", internalURL=" + internalURL
    
  •                   + ", adminURL=" + adminURL + "]";
    

- }

- }

- private String type;

- private String name;

- private List endpoints;

  •   @JsonProperty("endpoints_links")
    
  •   private List<Link> endpointsLinks;
    
  • @JsonIgnoreProperties(ignoreUnknown = true)
  • public static final class Endpoint {
  •   /**
    
  •    \* @return the type
    
  •    */
    
  •   public String getType() {
    
  •       return type;
    
  •   }
    
  •  private String region;
    
  •  private String publicURL;
    
  •  private String internalURL;
    
  •  private String adminURL;
    
  •   /**
    
  •    \* @return the name
    
  •    */
    
  •   public String getName() {
    
  •       return name;
    
  •   }
    
  •  /**
    
  •   \* @return the region
    
  •   */
    
  •  public String getRegion() {
    
  •    return region;
    
  •  }
    
  •   /**
    
  •    \* @return the endpoints
    
  •    */
    
  •   public List<Endpoint> getEndpoints() {
    
  •       return endpoints;
    
  •   }
    
  •  /**
    
  •   \* @return the publicURL
    
  •   */
    
  •  public String getPublicURL() {
    
  •    return publicURL;
    
  •  }
    
  •   /**
    
  •    \* @return the endpointsLinks
    
  •    */
    
  •   public List<Link> getEndpointsLinks() {
    
  •       return endpointsLinks;
    
  •   }
    
  •  /**
    
  •   \* @return the internalURL
    
  •   */
    
  •  public String getInternalURL() {
    
  •    return internalURL;
    
  •  }
    
  •   /* (non-Javadoc)
    
  •    \* @see java.lang.Object#toString()
    
  •    */
    
  •   @Override
    
  •   public String toString() {
    
  •       return "Service [type=" + type + ", name=" + name + ", endpoints="
    
  •               + endpoints + ", endpointsLinks=" + endpointsLinks + "]";
    

- }

- }

- public static final class User {

  •   @JsonIgnoreProperties(ignoreUnknown=true)
    

- public static final class Role {

- private String id;

  •       private String name;
    
  •  /**
    
  •   \* @return the adminURL
    
  •   */
    
  •  public String getAdminURL() {
    
  •    return adminURL;
    
  •  }
    
  •       /**
    
  •        \* @return the id
    
  •        */
    
  •       public String getId() {
    
  •           return id;
    
  •       }
    
  •  /*
    
  •   \* (non-Javadoc) @see java.lang.Object#toString()
    
  •   */
    
  •  @Override
    
  •  public String toString() {
    
  •    return "Endpoint [region=" + region + ", publicURL="
    
  •            + publicURL + ", internalURL=" + internalURL
    
  •            + ", adminURL=" + adminURL + "]";
    
  •  }
    
  • }
  • private String type;
  • private String name;
  • private List endpoints;
  • @JsonProperty("endpoints_links")
  • private List endpointsLinks;
  •       /**
    
  •        \* @return the name
    
  •        */
    
  •       public String getName() {
    
  •           return name;
    
  •       }
    
  • /**
  • \* @return the type
    
  • */
    
  • public String getType() {
  •  return type;
    
  • }
  •       /* (non-Javadoc)
    
  •        \* @see java.lang.Object#toString()
    
  •        */
    
  •       @Override
    
  •       public String toString() {
    
  •           return "Role [id=" + id + ", name=" + name + "]";
    

- }

- }

- private String id;

- private String name;

- private String username;

- private List roles;

  •   @JsonProperty("roles_links")
    
  •   private List<Link> rolesLinks;
    
  • /**
  • \* @return the name
    
  • */
    
  • public String getName() {
  •  return name;
    
  • }
  •   /**
    
  •    \* @return the id
    
  •    */
    
  •   public String getId() {
    
  •       return id;
    
  •   }
    
  • /**
  • \* @return the endpoints
    
  • */
    
  • public List getEndpoints() {
  •  return endpoints;
    
  • }
  •   /**
    
  •    \* @return the name
    
  •    */
    
  •   public String getName() {
    
  •       return name;
    
  •   }
    
  • /**
  • \* @return the endpointsLinks
    
  • */
    
  • public List getEndpointsLinks() {
  •  return endpointsLinks;
    
  • }
  •   /**
    
  •    \* @return the username
    
  •    */
    
  •   public String getUsername() {
    
  •       return username;
    
  •   }
    
  • /*
  • \* (non-Javadoc) @see java.lang.Object#toString()
    
  • */
    
  • @OverRide
  • public String toString() {
  •  return "Service [type=" + type + ", name=" + name + ", endpoints="
    
  •          + endpoints + ", endpointsLinks=" + endpointsLinks + "]";
    
  • }
  • }
  •   /**
    
  •    \* @return the roles
    
  •    */
    
  •   public List<Role> getRoles() {
    
  •       return roles;
    
  •   }
    
  • @JsonIgnoreProperties(ignoreUnknown = true)
  • public static final class User {
  •   /**
    
  •    \* @return the rolesLinks
    
  •    */
    
  •   public List<Link> getRolesLinks() {
    
  •       return rolesLinks;
    
  •   }
    
  • @JsonIgnoreProperties(ignoreUnknown = true)
  • public static final class Role {
  •   /* (non-Javadoc)
    
  •    \* @see java.lang.Object#toString()
    
  •    */
    
  •   @Override
    
  •   public String toString() {
    
  •       return "User [id=" + id + ", name=" + name + ", username="
    
  •               + username + ", roles=" + roles + ", rolesLinks="
    
  •               + rolesLinks + "]";
    

- }

- }

- private Token token;

- private List serviceCatalog;

- private User user;

  • private Map<String, Object> metadata;
  •  private String id;
    
  •  private String name;
    
  • /**
  • * @return the token
  • */
  • public Token getToken() {
  •   return token;
    
  • }
  •  /**
    
  •   \* @return the id
    
  •   */
    
  •  public String getId() {
    
  •    return id;
    
  •  }
    
  • /**
  • * @return the serviceCatalog
  • */
  • public List getServiceCatalog() {
  •   return serviceCatalog;
    
  • }
  •  /**
    
  •   \* @return the name
    
  •   */
    
  •  public String getName() {
    
  •    return name;
    
  •  }
    
  • /**
  • * @return the user
  • */
  • public User getUser() {
  •   return user;
    
  • }
  •  /*
    
  •   \* (non-Javadoc) @see java.lang.Object#toString()
    
  •   */
    
  •  @Override
    
  •  public String toString() {
    
  •    return "Role [id=" + id + ", name=" + name + "]";
    
  •  }
    
  • }
  • private String id;
  • private String name;
  • private String username;
  • private List roles;
  • @JsonProperty("roles_links")
  • private List rolesLinks;
  • /**
  • * @return the metadata
  • */
  • public Map<String, Object> getMetadata() {
  •   return metadata;
    
  • }
  • /**
  • \* @return the id
    
  • */
    
  • public String getId() {
  •  return id;
    
  • }
  • /* (non-Javadoc)
  • * @see java.lang.Object#toString()
  • */
  • @OverRide
  • public String toString() {
  •   return "Access [token=" + token + ", serviceCatalog=" + serviceCatalog
    
  •           + ", user=" + user + ", metadata=" + metadata + "]";
    

- }

  • /**
  • \* @return the name
    
  • */
    
  • public String getName() {
  •  return name;
    
  • }
  • /**
  • \* @return the username
    
  • */
    
  • public String getUsername() {
  •  return username;
    
  • }
  • /**
  • \* @return the roles
    
  • */
    
  • public List getRoles() {
  •  return roles;
    
  • }
  • /**
  • \* @return the rolesLinks
    
  • */
    
  • public List getRolesLinks() {
  •  return rolesLinks;
    
  • }
  • /*
  • \* (non-Javadoc) @see java.lang.Object#toString()
    
  • */
    
  • @OverRide
  • public String toString() {
  •  return "User [id=" + id + ", name=" + name + ", username="
    
  •          + username + ", roles=" + roles + ", rolesLinks="
    
  •          + rolesLinks + "]";
    
  • }
  • }
  • private Token token;
  • private List serviceCatalog;
  • private User user;
  • private Map<String, Object> metadata;
  • /**
  • * @return the token
  • */
  • public Token getToken() {
  • return token;
  • }
  • /**
  • * @return the serviceCatalog
  • */
  • public List getServiceCatalog() {
  • return serviceCatalog;
  • }
  • /**
  • * @return the user
  • */
  • public User getUser() {
  • return user;
  • }
  • /**
  • * @return the metadata
  • */
  • public Map<String, Object> getMetadata() {
  • return metadata;
  • }
  • /*
  • * (non-Javadoc) @see java.lang.Object#toString()
  • */
  • @OverRide
  • public String toString() {
  • return "Access [token=" + token + ", serviceCatalog=" + serviceCatalog
  •        + ", user=" + user + ", metadata=" + metadata + "]";
    
  • }
    }
    diff --git a/nova-client/src/main/java/org/openstack/nova/api/ExtensionCore.java b/nova-client/src/main/java/org/openstack/nova/api/ExtensionCore.java
    new file mode 100644
    index 0000000..ed73ea7
    --- /dev/null
    +++ b/nova-client/src/main/java/org/openstack/nova/api/ExtensionCore.java
    @@ -0,0 +1,57 @@
    +/*
  • * Copyright 2012 Mr.Nam.
  • * Licensed under the Apache License, Version 2.0 (the "License");
  • * you may not use this file except in compliance with the License.
  • * You may obtain a copy of the License at
  • * http://www.apache.org/licenses/LICENSE-2.0
  • * Unless required by applicable law or agreed to in writing, software
  • * distributed under the License is distributed on an "AS IS" BASIS,
  • * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  • * See the License for the specific language governing permissions and
  • * limitations under the License.
  • /
    +package org.openstack.nova.api;
    +
    +import javax.ws.rs.client.WebTarget;
    +import javax.ws.rs.core.MediaType;
    +import org.openstack.nova.NovaCommand;
    +import org.openstack.nova.model.Extensions;
    +import org.openstack.nova.model.Images;
    +
    +/
    *
  • * @author Mr.Nam
  • */
    +public class ExtensionCore {
    +
  • public static class ListExtensions implements NovaCommand {
  • boolean detail;
  • public ListExtensions(boolean detail) {
  •  this.detail = detail;
    
  • }
  • public ListExtensions() {
  •  this(false);
    
  • }
  • @OverRide
  • public Extensions execute(WebTarget target) {
  •  String path = detail ? "extensions/detail" : "extensions";
    
  •  return target.path(path).request(MediaType.APPLICATION_JSON).get(Extensions.class);
    
  •  //throw new UnsupportedOperationException("Not supported yet.");
    
  • }
  • }
  • public static ListExtensions listExtensions(boolean detail) {
  • return new ListExtensions(detail);
  • }
  • public static ListExtensions listExtensions() {
  • return listExtensions(false);
  • }
    +}
    diff --git a/nova-client/src/main/java/org/openstack/nova/api/ListExtensions.java b/nova-client/src/main/java/org/openstack/nova/api/ListExtensions.java
    deleted file mode 100644
    index 6bc944e..0000000
    --- a/nova-client/src/main/java/org/openstack/nova/api/ListExtensions.java
    +++ /dev/null
    @@ -1,16 +0,0 @@
    -package org.openstack.nova.api;

-import javax.ws.rs.client.WebTarget;
-import javax.ws.rs.core.MediaType;

-import org.openstack.nova.NovaCommand;
-import org.openstack.nova.model.Extensions;

-public class ListExtensions implements NovaCommand {

  • @OverRide
  • public Extensions execute(WebTarget target) {
  •   return target.path("extensions").request(MediaType.APPLICATION_JSON).get(Extensions.class);
    

- }

-}

Mask passwords in log messages

Passwords have been logging in plain text. I think the should be masked (i.e. with ****).
I can provide a patch for this. What do you think?

Regards,
Antonio.

Keystone Client Cannot be resolved to a type

I'm building a android cloud storage app.
I'm new in openstack as well as maven type of project.
I tried adding these openstack-java-sdk folders by java build path in my android application.
Some functionalities can be read but some couldn't.

I start using these code;

    KeystoneClient keystone = new KeystoneClient("#####/v2.0/tokens");
    Authentication authentication = new Authentication();
    PasswordCredentials passwordCredentials = new PasswordCredentials();
    passwordCredentials.setUsername("##");
    passwordCredentials.setPassword("##");
    authentication.setPasswordCredentials(passwordCredentials);

    //access with unscoped token
    Access access = keystone.execute(new Authenticate(authentication));

    //use the token in the following requests
    keystone.setToken(access.getToken().getId());

However, I'm getting errors like

KeystoneClient cannot be resolved to a type
Cannot instatiate type authentication
The method set password credentials is undefined for a type authentication

Why is this so?
Is my approach in using this maven project wrong?
What are the steps to resolve these.

Thanks for the help

Add missing totalFloatingIpsUsed attribute in Limits

Getting an exception on an an unknown property:

Caused by: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "totalFloatingIpsUsed" (Class com.woorea.openstack.nova.model.Limits), not marked as ignorable

DownloadImage looks not worked

I'm use the glance-client for image download.

Try the following code. But the input stream always return empty.

DownloadImage download = new DownloadImage(imageId);
ImageDownload downloadImage = client.execute(download);
InputStream stream = downloadImage.getInputStream();

Maybe, now, DownloadImage command request the HEAD method.

@Override
public ImageDownload execute(WebTarget target) {
    Response response = target.path("images").path(id).request(MediaType.APPLICATION_OCTET_STREAM).head();
    Image image = new Image();

OpenStack API need GET request for download image.
So, make the change in the code as following.

@Override
public ImageDownload execute(WebTarget target) {
    Response response = target.path("images").path(id).request(MediaType.APPLICATION_OCTET_STREAM).get();
    Image image = new Image();

Flavors has a new attribute at Rackspace "OS-FLV-WITH-EXT-SPECS:extra_specs"

Hi,
how should those extra fields be handled? It seems that any Provider of the Cloud is able to add those fields, and that it breaks the client. Should I create a Pull Request for this field, or would you like to handle it that way, that all Unknown Properties are ignored?

@JsonRootName("extraSpec")
public class ExtraSpec {

    @JsonProperty("class")
    private String clazz;

    @JsonProperty("disk_io_index")
    private String diskIoIndex;

    @JsonProperty("number_of_data_disks")
    private Float numberOfDataDisks;
...
}

Runing in java application well but connector of Keystone is always null when using in android

the code:
Keystone keystone = new Keystone("http://10.10.10:5000/v2.0");

it works well in my java application but not in a android one.

Variables in Java app:
keystone Keystone (id=21)
connector JaxRs20Connector (id=21)
endpoint "http://10.10.10.249:5000/v2.0" (id=24)
ENDPOINTS EndpointsResource (id=25)
properties Properties (id=30)
ROLES RolesResource (id=32)
SERVICES ServicesResource (id=35)
TENANTS TenantsResource (id=40)
tokenProvider null
TOKENS TokensResource (id=42)
USERS UsersResource (id=44)

in Android:
keystone Keystone (id=831946137712)
connector null
endpoint "http://10.10.10.249:5000/v2.0" (id=831946137768)
ENDPOINTS EndpointsResource (id=831946142536)
properties Properties (id=831946137976)
ROLES RolesResource (id=831946141016)
SERVICES ServicesResource (id=831946141768)
TENANTS TenantsResource (id=831946139512)
tokenProvider null
TOKENS TokensResource (id=831946138760)
USERS UsersResource (id=831946140264)

so I'm so confusing with this. Am I missing something?

openstack sdk out of memory

Hello, I have a for an FlavorsCore. ListFlavors (true), performs to 1775 times, error occurs
Java heap space

Exception in thread "main" javax.ws.rs.ProcessingException: Java heap space
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:224)
at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:725)
at org.glassfish.jersey.internal.Errors.process(Errors.java:251)
at org.glassfish.jersey.internal.Errors.process(Errors.java:233)
at org.glassfish.jersey.internal.Errors.process(Errors.java:164)
at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:421)
at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:721)
at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:376)
at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:276)
at org.openstack.nova.api.FlavorsCore$ListFlavors.execute(FlavorsCore.java:31)
at org.openstack.nova.api.FlavorsCore$ListFlavors.execute(FlavorsCore.java:1)
at org.openstack.nova.NovaClient.execute(NovaClient.java:12)
at org.openstack.examples.compute.NovaListFlavors.main(NovaListFlavors.java:68)
Caused by: java.lang.OutOfMemoryError: Java heap space
at org.glassfish.jersey.filter.LoggingFilter.logInboundEntity(LoggingFilter.java:186)
at org.glassfish.jersey.filter.LoggingFilter.filter(LoggingFilter.java:225)
at org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:134)
at org.glassfish.jersey.client.ClientFilteringStages$ResponseFilterStage.apply(ClientFilteringStages.java:123)
at org.glassfish.jersey.process.internal.Stages.process(Stages.java:171)
at org.glassfish.jersey.client.ClientRuntime.invoke(ClientRuntime.java:220)
... 12 more

findEndpointURL() should also check for version number

Hi,
me again; I hope you don't mind, that I am opening new tickets. I like your library a lot, and would like to help, to make it better. Currently I am facing the problem with the Rackspace Openstack API, that the following snippet does not work as it could be:

KeystoneUtils.findEndpointURL(access.getServiceCatalog(), "compute", null, "public").concat(access.getToken().getId());

The issue here, is that Rackspace offers V1 and V2 in their service catalog. Both labeled under "compute". As V1 is always the first item in the for - iteration, the second won't be found in any case. So what I would suggest, is to extend KeystoneUtils.findEndpointURL() with a version number verification.

What do you think? Is there any option I may contribute to this project with documentation or is this not welcome?

P.S. Perhaps you could add Labels, so that it would be possible to label tickets.

Cinder api for grizzly

Thanks for your openstack java api, but when will you update the cinder api for stable grizzly version?

Nova host actions missing: startup, shutdown, (reboot)

I do not see a HostActionsResource at all. An example of a host action is startup:

Put: v2/​{tenant_id}​/os-hosts/​{host_name}​/startup

{
    "host": "57f5de2fa5b44f14974a4f50b9ffcbf8",
    "power_action": "startup"
}

Starts a host.

SecurityGroup Ids

Hi there,
Thanks for your SDK. I have been testing this against a local grizzly install as well as hpcloud's beta grizzly and found that the security group id and parent_group_id etc are all strings now . The outs look something like this

{
"description": "default",
"id": "150accdd-65a7-4c8f-9ebe-096ca49533f7",
"name": "default",
"rules": [
{
"from_port": null,
"group": {
"name": "default",
"tenant_id": "a5efece8f89b449099f7a40379c3cb53"
},
"id": "4c5493b5-21d4-4dff-a7e0-1e028545065b",
"ip_protocol": null,
"ip_range": {},
"parent_group_id": "150accdd-65a7-4c8f-9ebe-096ca49533f7",
"to_port": null
},
{
"from_port": null,
"group": {
"name": "default",
"tenant_id": "a5efece8f89b449099f7a40379c3cb53"
},
"id": "e9dc0a28-cbbf-40eb-9790-5c1872ee8489",
"ip_protocol": null,
"ip_range": {},
"parent_group_id": "150accdd-65a7-4c8f-9ebe-096ca49533f7",
"to_port": null
}
],
"tenant_id": "a5efece8f89b449099f7a40379c3cb53"
},

therefore the Json parsing fails since its expecting an integer.
@JsonProperty("parent_group_id")
private Integer parentGroupId;

Can this be fixed somehow ?

Thanks
Venkat

Describe availability zones

Hello,
Does the current snapshot support the API for describing availability zones ?
"*/os-availability-zone/detail"

I cant seem to find it. If not can I add this ?

Thanks

Jackson failure when mapping the Image class

I'm getting the following exception when I try to read out the list of images:

com.sun.jersey.api.client.ClientHandlerException: org.codehaus.jackson.map.exc.UnrecognizedPropertyException: Unrecognized field "server" (Class com.woorea.openstack.nova.model.Image), not marked as ignorable at [Source: java.io.ByteArrayInputStream@36664140; line: 1, column: 696] (through reference chain: com.woorea.openstack.nova.model.Images["images"]->com.woorea.openstack.nova.model.Image["server"])

The Image class does not have the @JsonIgnoreProperties(ignoreUnknown=true) annotation on the class declaration and my version of Openstack seems to be passing back a field called "Server". I've successfully worked around this issue by cloning a copy of the nova-model source, compiling it with a higher version number (3.2.2 in my case), and changing my Maven dependency to use the new version.

Working maven repos

Hi,
thanks for this great project. I just wanted to update to the latest release, when I realised, that none of the mentioned maven repos is working. Do you have a repo with the current version running?

Would be cool, thanks!

Missing requirement google-collections?

Hi,

Edit: I should study java a bit more and Maven. No need to read further thx.

I've been trying to get a sample app running using the Openstack Java sdk, but I keep getting into troubles.

I'm using the stable/essex branch and this is the error I got:
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Preconditions
at org.openstack.client.OpenStackClient.getIdentityEndpoint(OpenStackClient.java:118)
at org.openstack.client.OpenStackClient.authenticate(OpenStackClient.java:78)
at javasdktesting.Main.main(Main.java:20)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Preconditions
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)

Seems java sdk requires the old google-collections? https://code.google.com/p/google-collections/

After removing all code which uses Preconditions I get the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/ws/rs/client/Feature
at org.openstack.client.OpenStackClient.target(OpenStackClient.java:187)
at org.openstack.client.OpenStackClient.target(OpenStackClient.java:182)
at org.openstack.client.OpenStackClient.getIdentityEndpoint(OpenStackClient.java:116)
at org.openstack.client.OpenStackClient.authenticate(OpenStackClient.java:76)
at javasdktesting.Main.main(Main.java:20)
Caused by: java.lang.ClassNotFoundException: javax.ws.rs.client.Feature
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 5 more

Seems the mvn pom.xml is not up to date?

javax/ws/rs/client/Feature is part of 2.0 version http://grepcode.com/file/repo1.maven.org/maven2/javax.ws.rs/javax.ws.rs-api/2.0-m05/javax/ws/rs/client/Feature.java

I did the following but also without success:
git clone openstack-java-sdk
cd openstack-java-sdk
mvn eclipse:eclipse

Then try to run the project as java application but it will also throw the Preconditions error

Is the master branch usable? I tried to use it but didn't work either got in a dependency hell.

Haven't touched java in ages, so maybe I'm just doing something stupid.

Glance API: Adding of an image

When I try to create an image instead of sending the parameters in the headers like that (like glance client)

POST /v1/images HTTP/1.1
Host: 127.0.0.1:35332
Accept-Encoding: identity
x-image-meta-name: newimg
x-image-meta-image_format: iso
x-image-meta-container_format: bare 
x-image-meta-is_public: False
Content-Type: application/octet-stream
X-Auth-Token: ae0128d95b564ddcbfb47765fda75f3e
User-Agent: python-glanceclient 

openstack-java-sdk sends it like that

X-Auth-Token: bd4a316f4cc44269a3c48c588a78805c
Accept: application/json
Content-Length: 230
Content-Type: application/json
Host: 127.0.0.1:35332
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.2 (java 1.5) 

{
  "image" : {
    "name" : "DamnSmallLinux",
    "properties" : { },
    "protected" : false,
    "public" : false,
    "deleted" : false,
    "disk_format" : "iso",
    "container_format" : "bare",
    "is_public" : false
  }
} 

As a result creating image doesn't work. I receive

<html>
 <head>
  <title>400 Bad Request</title>
 </head>
 <body>
  <h1>400 Bad Request</h1>
  Invalid disk format 'None' for image.<br /><br />



 </body>
</html> 

Indeed once message (even one with all correct headers) has a body you get this error.

If you look here:
http://docs.openstack.org/developer/glance/glanceapi.html
you'll see well described headers. Moreover

  • x-image-meta-name

This header is required. Its value should be the name of the image

Thanks in advance!

Tested with OpenStack 2012.2.3 on Fedora 18

Q: How to control log outputs

Hello,

I have a question on log output control feature.

If I understand correctly, formerly OpenStackClient had methods,
enableLogging() and disableLogging(), but they are disabled now.

I think that there is still a kind of workaround like the following.

But I don't think it's good because the below requires
non-documented knowledge, and I want to know the correct way
(or future plans).

  1. Create a LogFilter as one likes.

    In case of me, I wrote a stupid LogFilter which returns false to
    every isLoggable() call like the following.
    https://github.com/thatsdone/junkbox/blob/f7167fe9b8915dd91e4863c310bffbc0a0d05572/java/Jnova.java#L123

  2. Get a Logger handle using "os"

    This works because both jersey-connector and jersey2-connector
    call getLogger() using the same fixed string, "os".

    IMHO, the above could be another discussion point.

  3. Add the LogFilter to the Logger handle

    In case of me, the following code is anyway working...
    https://github.com/thatsdone/junkbox/blob/f7167fe9b8915dd91e4863c310bffbc0a0d05572/java/Jnova.java#L183

Thanks in advance,
Masanori

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.