Skip to content
This repository has been archived by the owner on Mar 6, 2019. It is now read-only.

Security Groups are no longer tagged with the VPC so the convertSECUGROUPNameToId() does not return a result if the VPC is specified #47

Closed
28formica77 opened this issue Apr 5, 2017 · 2 comments

Comments

@28formica77
Copy link
Contributor

The problem seems to lie with these if checks:

        if security_group.get("name") == OtcConfig.SECUGROUPNAME and ( security_group.get("vpc_id") == OtcConfig.VPCID or OtcConfig.VPCID is None ) :
            OtcConfig.SECUGROUP = security_group["id"]
        if security_group.get("name") == OtcConfig.SOURCE_GROUP and ( security_group.get("vpc_id") == OtcConfig.VPCID or OtcConfig.VPCID is None ) :
            OtcConfig.SOURCE_GROUP_ID = security_group["id"]

the second condition is not satisfied if the VPC is specified but the SG is not tagged.

( security_group.get("vpc_id") == OtcConfig.VPCID or OtcConfig.VPCID is None )

This extra check seems unnecessary?

So this command fails for new security groups but not old ones.

otc ecs run-instances --count 1 --instance-type c1.medium --instance-name TEST_VM_API --image-name Standard_openSUSE_42.1_JeOS_latest --subnet-name subnet-az1-131 --vpc-name TEST --group-names TEST --key-name TEST

with --security-group-ids, it works.

@hodigy
Copy link
Contributor

hodigy commented Apr 14, 2017

fixed in pull req. #50

@zsoltn
Copy link
Collaborator

zsoltn commented Apr 18, 2017

Based on @hodigy comment I close.

@zsoltn zsoltn closed this as completed Apr 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants