'Associates a security group with the L7 load balancer.'

def add_security_group(self):

    bindings = self.bindings
    sec_group_payload = self.agent.make_json_payload_from_kwargs(job=[{'allowed': [{'ipProtocol': 'tcp', 'portRanges': ['80-80']}, {'ipProtocol': 'tcp', 'portRanges': ['8080-8080']}, {'ipProtocol': 'tcp', 'portRanges': ['443-443']}], 'backingData': {'networks': ['default']}, 'cloudProvider': 'gce', 'application': self.TEST_APP, 'credentials': bindings['SPINNAKER_GOOGLE_ACCOUNT'], 'description': '', 'detail': 'http', 'ipIngress': [{'type': 'tcp', 'startPort': 80, 'endPort': 80}, {'type': 'tcp', 'startPort': 8080, 'endPort': 8080}, {'type': 'tcp', 'startPort': 443, 'endPort': 443}], 'name': (self.__lb_name + '-rule'), 'network': 'default', 'region': 'global', 'securityGroupName': (self.__lb_name + '-rule'), 'sourceRanges': ['0.0.0.0/0'], 'targetTags': [(self.__lb_name + '-tag')], 'type': 'upsertSecurityGroup', 'user': '[anonymous]'}], description='Create    a    Security    Group    for    L7    operations.', application=self.TEST_APP)
    builder = gcp.GcpContractBuilder(self.gcp_observer)
    builder.new_clause_builder('Security    Group    Created', retryable_for_secs=30).list_resource('firewalls').EXPECT(ov_factory.value_list_path_contains('name', jp.STR_SUBSTR((self.__lb_name + '-rule'))))
    return st.OperationContract(self.new_post_operation(title='create    security    group', data=sec_group_payload, path='tasks'), contract=builder.build())
