CenturyLinkCloud / clc-java-sdk

Apache License 2.0
6 stars 4 forks source link

Implement possibilities to create load balancer with multiple pools by single command #176

Closed idrabenia closed 8 years ago

idrabenia commented 8 years ago

_As SDK user I want to have possibilities to create load balancer with multiple pools / nodes by single method call_

Proposed syntax:


loadBalancerService
    .create(new LoadBalancerConfig() 
        .name(...)
        .description(...) 
        .status(...) // I think it would be great to make it optional, default is enabled
        .dataCenter(...)
        .pool(new LoadBalancerPool()
            .port(...)
            .method(...)
            .persistence(...) 
            .nodes(
                new LoadBalancerNode()
                    .status(...) // optional, default value is enabled
                    .ipAddress(...)
                    .port(...),

                new LoadBalancerNode()
                    .status(...) 
                    .ipAddress(...)
                    .port(...),

                new LoadBalancerNode()
                    .status(...)
                    .ipAddress(...)
                    .port(...)
            ), ...
        )
    );

Notes: It would be great if pool and nodes methods allow to specify arguments as varagrs and as List<>.