85a34c9d003bbf69c50721c9f07c17553fdcaba3,perfkitbenchmarker/providers/gcp/gce_network.py,GceFirewallRule,_Create,#GceFirewallRule#,50

Before Change



  def _Create(self):
    Creates the Firewall Rule.
    create_cmd = [FLAGS.gcloud_path,
                  "compute",
                  "firewall-rules",
                  "create",
                  self.name,
                  "--allow", "tcp:%d" % self.port, "udp:%d" % self.port]
    create_cmd.extend(util.GetDefaultGcloudFlags(self))
    vm_util.IssueCommand(create_cmd)

  def _Delete(self):
    Deletes the Firewall Rule.
    delete_cmd = [FLAGS.gcloud_path,

After Change



  def _Create(self):
    Creates the Firewall Rule.
    cmd = util.GcloudCommand("compute", "firewall-rules", "create", self.name)
    cmd.flags["allow"] = ",".join("{0}:{1}".format(protocol, self.port)
                                  for protocol in ("tcp", "udp"))
    cmd.AddCommonFlags(self)
    cmd.Issue()

  def _Delete(self):
    Deletes the Firewall Rule.
    cmd = util.GcloudCommand("compute", "firewall-rules", "delete", self.name)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 14

Instances


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 85a34c9d003bbf69c50721c9f07c17553fdcaba3
Time: 2015-11-17
Author: skschneider@google.com
File Name: perfkitbenchmarker/providers/gcp/gce_network.py
Class Name: GceFirewallRule
Method Name: _Create


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 85a34c9d003bbf69c50721c9f07c17553fdcaba3
Time: 2015-11-17
Author: skschneider@google.com
File Name: perfkitbenchmarker/providers/gcp/gce_network.py
Class Name: GceFirewallRule
Method Name: _Create


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 85a34c9d003bbf69c50721c9f07c17553fdcaba3
Time: 2015-11-17
Author: skschneider@google.com
File Name: perfkitbenchmarker/providers/gcp/gce_disk.py
Class Name: GceDisk
Method Name: _Delete


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 85a34c9d003bbf69c50721c9f07c17553fdcaba3
Time: 2015-11-17
Author: skschneider@google.com
File Name: perfkitbenchmarker/providers/gcp/gce_disk.py
Class Name: GceDisk
Method Name: _Exists


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 85a34c9d003bbf69c50721c9f07c17553fdcaba3
Time: 2015-11-17
Author: skschneider@google.com
File Name: perfkitbenchmarker/providers/gcp/gce_network.py
Class Name: GceFirewallRule
Method Name: _Delete


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 85a34c9d003bbf69c50721c9f07c17553fdcaba3
Time: 2015-11-17
Author: skschneider@google.com
File Name: perfkitbenchmarker/providers/gcp/gce_network.py
Class Name: GceFirewallRule
Method Name: _Exists