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

Add policy management methods to the ELB driver #253

Closed
wants to merge 3 commits into
base: trunk
from

Conversation

Projects
None yet
2 participants
@rahulrrixe

rahulrrixe commented Feb 22, 2014

@Kami I am not able to debug the elb.py individually. I have followed the testing guidlines from the official documentation.

P.S. From now onward i will create pull request after i have made few changes. I am not used to it, because in fedora community we used to discuss things on fpaste and then create pr.

Rahul Ranjan added some commits Feb 18, 2014

Rahul Ranjan
added ex_rename() extention method to the driver
added test suite for the ex_rename() extention method

changed ex_rename() to ex_rename_node() extention method

Added the MockHttptestcase from ex_rename_node() extension method

changed ex_rename() to ex_rename_node() extention method

corrected the MockHttptestcase for ex_rename_node() method

Added a fixture for ex_rename_node() method
@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Feb 23, 2014

Member

@rahulrrixe I'm not sure exactly what you mean with "I am not able to debug the elb.py individually".

You don't have an AWS account? Or is it something else?

Member

Kami commented Feb 23, 2014

@rahulrrixe I'm not sure exactly what you mean with "I am not able to debug the elb.py individually".

You don't have an AWS account? Or is it something else?

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Feb 23, 2014

Member

To make this useful, we also need to implement SetLoadBalancerPoliciesOfListener method (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_SetLoadBalancerPoliciesOfListener.html).

This method actually applies a policy to the load balancer.

From the article:

elb-create-lb-policy  myELBName        \
  --policy-type SSLNegotiationPolicyType \
  --policy-name=mySSLPolicyName        \
  --attribute "name=Reference-Security-Policy, value=ELBSecurityPolicy-2014-01"

$ elb-set-lb-policies-of-listener  myELBName \
  --lb-port 443 \
  --policy-names mySSLPolicyName,[PolicyName2,...]
Member

Kami commented Feb 23, 2014

To make this useful, we also need to implement SetLoadBalancerPoliciesOfListener method (http://docs.aws.amazon.com/ElasticLoadBalancing/latest/APIReference/API_SetLoadBalancerPoliciesOfListener.html).

This method actually applies a policy to the load balancer.

From the article:

elb-create-lb-policy  myELBName        \
  --policy-type SSLNegotiationPolicyType \
  --policy-name=mySSLPolicyName        \
  --attribute "name=Reference-Security-Policy, value=ELBSecurityPolicy-2014-01"

$ elb-set-lb-policies-of-listener  myELBName \
  --lb-port 443 \
  --policy-names mySSLPolicyName,[PolicyName2,...]
@rahulrrixe

This comment has been minimized.

Show comment
Hide comment
@rahulrrixe

rahulrrixe Feb 23, 2014

@Kami Thanks I will make the required changes.

regarding debugging I have fixed everything and its working fine and now working on writing test suits.

rahulrrixe commented Feb 23, 2014

@Kami Thanks I will make the required changes.

regarding debugging I have fixed everything and its working fine and now working on writing test suits.

@rahulrrixe

This comment has been minimized.

Show comment
Hide comment
@rahulrrixe

rahulrrixe Feb 25, 2014

@Kami I have checked all the methods with the aws instance and they all are working fine.

rahulrrixe commented Feb 25, 2014

@Kami I have checked all the methods with the aws instance and they all are working fine.

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Feb 25, 2014

Member

There are still lint and test failures btw - https://travis-ci.org/apache/libcloud/builds/19573773

Member

Kami commented Feb 25, 2014

There are still lint and test failures btw - https://travis-ci.org/apache/libcloud/builds/19573773

@rahulrrixe

This comment has been minimized.

Show comment
Hide comment
@rahulrrixe

rahulrrixe Feb 26, 2014

@Kami I have made all the changes that you have suggested and also written test suits for the newly added extension methods. I am getting lint failure at some places, will fix them soon.

Can you give me your feedback on these changes?

rahulrrixe commented Feb 26, 2014

@Kami I have made all the changes that you have suggested and also written test suits for the newly added extension methods. I am getting lint failure at some places, will fix them soon.

Can you give me your feedback on these changes?

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Feb 26, 2014

Member

It would also be good to add some documentation and examples of how to use that.

Adding an example for common scenario like creating a listener and setting a policy for SSL would be good.

Member

Kami commented Feb 26, 2014

It would also be good to add some documentation and examples of how to use that.

Adding an example for common scenario like creating a listener and setting a policy for SSL would be good.

@rahulrrixe

This comment has been minimized.

Show comment
Hide comment
@rahulrrixe

rahulrrixe Feb 26, 2014

@Kami I will add the documentation for the examples and also update different docstring's.

rahulrrixe commented Feb 26, 2014

@Kami I will add the documentation for the examples and also update different docstring's.

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Feb 26, 2014

Member

Just want to make sure we are both on the same page.

I meant adding documentation and examples to docs/loadbalancer/drivers/elb.rst :)

Member

Kami commented Feb 26, 2014

Just want to make sure we are both on the same page.

I meant adding documentation and examples to docs/loadbalancer/drivers/elb.rst :)

@rahulrrixe

This comment has been minimized.

Show comment
Hide comment
@rahulrrixe

rahulrrixe Feb 27, 2014

@Kami I have also added the documentation for the elb driver.

rahulrrixe commented Feb 27, 2014

@Kami I have also added the documentation for the elb driver.

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Feb 28, 2014

Member

@rahulrrixe Awesome!

I will review it and add some comments a bit later on.

Member

Kami commented Feb 28, 2014

@rahulrrixe Awesome!

I will review it and add some comments a bit later on.

@@ -0,0 +1,109 @@
========================================

This comment has been minimized.

@Kami

Kami Feb 28, 2014

Member

Please use consistent heading styles - for example, see docs/compute/drivers/cloudsigma.rst.

@Kami

Kami Feb 28, 2014

Member

Please use consistent heading styles - for example, see docs/compute/drivers/cloudsigma.rst.

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Feb 28, 2014

Member

@rahulrrixe You can do:

xpath = 'DescribeLoadBalancerPolicyTypesResult'
xpath += '/PolicyTypeDescriptions/member' 
Member

Kami commented Feb 28, 2014

@rahulrrixe You can do:

xpath = 'DescribeLoadBalancerPolicyTypesResult'
xpath += '/PolicyTypeDescriptions/member' 
@rahulrrixe

This comment has been minimized.

Show comment
Hide comment
@rahulrrixe

rahulrrixe Mar 2, 2014

@Kami I have updated the documentation but its facing some indentation error. Can you please suggest how can i debug it.

rahulrrixe commented Mar 2, 2014

@Kami I have updated the documentation but its facing some indentation error. Can you please suggest how can i debug it.

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Mar 2, 2014

Member

@rahulrrixe It looks like you are using invalid syntax. You should remove pipes (|) before the code snippets.

Member

Kami commented Mar 2, 2014

@rahulrrixe It looks like you are using invalid syntax. You should remove pipes (|) before the code snippets.

@rahulrrixe

This comment has been minimized.

Show comment
Hide comment
@rahulrrixe

rahulrrixe Mar 2, 2014

@Kami build successful 👍
Checked all the methods and test suits again on local system, everything is working fine. Also I tried to improve the documentation and will do more in future.

rahulrrixe commented Mar 2, 2014

@Kami build successful 👍
Checked all the methods and test suits again on local system, everything is working fine. Also I tried to improve the documentation and will do more in future.

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Mar 2, 2014

Member

@rahulrrixe Great.

Can you please squash all the commits and all go ahead and merge the changes.

Member

Kami commented Mar 2, 2014

@rahulrrixe Great.

Can you please squash all the commits and all go ahead and merge the changes.

@rahulrrixe

This comment has been minimized.

Show comment
Hide comment
@rahulrrixe

rahulrrixe commented Mar 2, 2014

@Kami sure

Added ex_create_balancer_policy() and ex_destroy_balancer_policy() me…
…thod

Added test suite for ex_create_balancer_policy() and ex_destroy_balancer_policy() method

Added ex_set_balancer_policies_listener(self, balancer) method

added all the methods required for adding & deleting policies

corrected the docstring and positioning of methods

added testsuits for extension methods

fixture for ex_create_balancer_policy() method

fixture for ex_list_balancer_policies() method

fixture for ex_list_balancer_policy_types() method

fixture for ex_set_balancer_policies_backend_server() method

fixture for ex_set_balancer_policies_listener() method

removed basestring for python 3 support

PEP8 guidelines fixture

added the documentation for the extension methods

corrected various docstrings

corrected various docstrings and lint

correct the lint and added argument names

pep8 fixtures

pep8 fixtures

made changes in the doc

python code of creating connection for the doc

made changes in the doc

python code for creating policy for doc ref

python code for creating load balancer for doc ref

python code for creating balancer listeners for doc ref

python code for deleting balancer policy for doc ref

python code for listing  balancer policies for doc ref

python code for listing  balancer policy types for doc ref

python code for set balancer policy types for backend server

python code for set balancer policy types for listeners

list all the load balancers

all method implemetation of ELB driver

improved the documentation

pep8 correction

removed indendation error

update the docstrings

update the docstrings

removed invalid syntax

removed sphinx build errors
@rahulrrixe

This comment has been minimized.

Show comment
Hide comment
@rahulrrixe

rahulrrixe commented Mar 2, 2014

@Kami done 👍

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami Mar 3, 2014

Member

I made some minor changes and fixed to the code examples and merged this patch into trunk.

Thanks.

Member

Kami commented Mar 3, 2014

I made some minor changes and fixed to the code examples and merged this patch into trunk.

Thanks.

@asfgit asfgit closed this in 68f8d22 Mar 3, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment