870e3915cf44ee8923bac2fb7b49bc7d7832209c,perfkitbenchmarker/providers/aws/aws_network.py,AwsInternetGateway,_Exists,#AwsInternetGateway#,304
Before Change
def _Exists(self):
Returns true if the internet gateway exists.
describe_cmd = util.AWS_PREFIX + [
"ec2",
"describe-internet-gateways",
"--region=%s" % self.region,
"--filter=Name=internet-gateway-id,Values=%s" % self.id]
stdout, _ = util.IssueRetryableCommand(describe_cmd)
response = json.loads(stdout)
internet_gateways = response["InternetGateways"]
assert len(internet_gateways) < 2, "Too many internet gateways."
return len(internet_gateways) > 0
After Change
def _Exists(self):
Returns true if the internet gateway exists.
return bool(self.GetDict())
def GetDict(self):
The "aws ec2 describe-internet-gateways" for this VPC / gateway id.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 870e3915cf44ee8923bac2fb7b49bc7d7832209c
Time: 2019-07-18
Author: chriswilkes@google.com
File Name: perfkitbenchmarker/providers/aws/aws_network.py
Class Name: AwsInternetGateway
Method Name: _Exists
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 870e3915cf44ee8923bac2fb7b49bc7d7832209c
Time: 2019-07-18
Author: chriswilkes@google.com
File Name: perfkitbenchmarker/providers/aws/aws_network.py
Class Name: AwsSubnet
Method Name: _Exists
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 1ee55a357496954534efc06f207c9c637986055d
Time: 2016-09-29
Author: nlavine@google.com
File Name: perfkitbenchmarker/providers/azure/azure_network.py
Class Name: AzureNetworkSecurityGroup
Method Name: DisallowAllPorts