-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add new command to update security group name #3739
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
Conversation
server/src/main/java/com/cloud/network/security/SecurityGroupManagerImpl.java
Outdated
Show resolved
Hide resolved
0d7ff87 to
b1a5aa6
Compare
wido
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM on the code
|
@ravening few points:
|
yadvr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my comment.
By default, once we create a security group we cant change its name. In this feature, we introduce a new API command "updateSecurityGroup" which allows us to rename the security group name. Although we can't change the name of the "default" security group.
b1a5aa6 to
d8a442e
Compare
@rhtyd I have made the necessary changes. Please review it again |
|
thanks @ravening |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-725 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
I did not test it. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-763 |
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm, remarks are definitely not -1-worthy. I am planning a quick test in our lab (time and lab space are at short hand atm)
|
|
||
| @Override | ||
| public String getCommandName() { | ||
| return s_name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd rather see it constructed form the API name .toLower()+"response". no biggy
| return securityGroup.getAccountId(); | ||
| } | ||
|
|
||
| return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this an exceptional situation? wouldn't there always be at least root admin responsible for creating a sec-group?
| public SecurityGroupVO doInTransaction(TransactionStatus status) { | ||
| SecurityGroupVO group = _securityGroupDao.lockRow(groupId, true); | ||
| if (group == null) { | ||
| throw new InvalidParameterValueException("Unable to find security group by id " + groupId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the message here could better be "unable to acquire lock for security group with id " + groupId
|
tested and works, just one remark. I think this is a generic details page problem in cloudstack but after saving, the old name is still used instead of the altered one. |
log out and in, or force refresh page - I recall similar issues on other parts of the gui |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✖centos7 ✔debian. JID-819 |
|
@blueorangutan package |
|
@GabrielBrascher a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-841 |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✖centos7 ✖debian. JID-862 |
|
will be regression tested in Trillian, when possible. thx |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✖debian. JID-884 |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-889 |
|
@blueorangutan test |
|
@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-1027)
|
|
@ravening can you enable the specific UI action in primate: https://github.com/apache/cloudstack-primate/blob/master/src/config/section/network.js#L188 |
By default, once we create a security group we cant change its name. In this feature, we introduce a new API command "updateSecurityGroup" which allows us to rename the security group name. Although we can't change the name of the "default" security group.
By default, once we create a security group we cant change its name. In this feature, we introduce a new API command "updateSecurityGroup" which allows us to rename the security group name. Although we can't change the name of the "default" security group.
By default, once we create a security group we cant change its name. In this feature, we introduce a new API command "updateSecurityGroup" which allows us to rename the security group name. Although we can't change the name of the "default" security group.
By default, once we create a security group we cant change its name. In this feature, we introduce a new API command "updateSecurityGroup" which allows us to rename the security group name. Although we can't change the name of the "default" security group.
Description
By default, once we create a security group we cant change its name.
In this feature, we introduce a new API command "updateSecurityGroup"
which allows us to rename the security group name. Although we can't
change the name of the "default" security group.
Types of changes
Screenshots (if appropriate):
Navigate to "Network" section in the main window and select "Security groups" from the drop-down menu in the top left section
Click on "Add Security group" to create a new security group

Once the security group is created you can rename it using the edit button
How Has This Been Tested?
Testing
New integration test case has been added which validates different test cases in updating the security group name. This can be run using
nosetests --with-marvin --marvin-config=<config file> test/integration/component/test_update_security_group.py