CenturyLinkCloud / clc-java-sdk

Apache License 2.0
6 stars 4 forks source link

Implement possibilities to modify load balancer with multiple pools by single command #177

Closed idrabenia closed 9 years ago

idrabenia commented 9 years ago

_As SDK user I want to have possibilities to modify all settings of load balancer by single method call_

Proposed syntax:


loadBlancerService
    .modify(loadBalancerReference, 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<>.