'Adds a server group to the L7 LB.'

def add_server_group(self):

    time.sleep(60)
    bindings = self.bindings
    group_name = '{app}-{stack}-v000'.format(app=self.TEST_APP, stack=bindings['TEST_STACK'])
    policy = {'balancingMode': 'UTILIZATION', 'listeningPort': 80, 'maxUtilization': 0.8, 'capacityScaler': 0.8}
    payload = self.agent.make_json_payload_from_kwargs(job=[{'cloudProvider': 'gce', 'application': self.TEST_APP, 'credentials': bindings['SPINNAKER_GOOGLE_ACCOUNT'], 'strategy': '', 'capacity': {'min': 1, 'max': 1, 'desired': 1}, 'targetSize': 1, 'image': bindings['TEST_GCE_IMAGE_NAME'], 'zone': bindings['TEST_GCE_ZONE'], 'stack': bindings['TEST_STACK'], 'instanceType': 'f1-micro', 'type': 'createServerGroup', 'tags': [(self.__lb_name + '-tag')], 'loadBalancers': [self.__lb_name], 'backendServices': {self.__lb_name: [('bs-' + self.TEST_APP)]}, 'disableTraffic': False, 'loadBalancingPolicy': {'balancingMode': 'UTILIZATION', 'listeningPort': 80, 'maxUtilization': 0.8, 'capacityScaler': 0.8}, 'availabilityZones': {bindings['TEST_GCE_REGION']: [bindings['TEST_GCE_ZONE']]}, 'instanceMetadata': {'startup-script': 'sudo    apt-get    update    &&    sudo    apt-get    install    apache2    -y', 'global-load-balancer-names': self.__lb_name, 'backend-service-names': ('bs-' + self.TEST_APP), 'load-balancing-policy': json.dumps(policy)}, 'account': bindings['SPINNAKER_GOOGLE_ACCOUNT'], 'authScopes': ['compute'], 'user': '[anonymous]'}], description=('Create    Server    Group    in    ' + group_name), application=self.TEST_APP)
    builder = gcp.GcpContractBuilder(self.gcp_observer)
    builder.new_clause_builder('Managed    Instance    Group    Added', retryable_for_secs=30).inspect_resource('instanceGroupManagers', group_name).EXPECT(ov_factory.value_list_path_contains('targetSize', jp.NUM_EQ(1)))
    return st.OperationContract(self.new_post_operation(title='create    server    group', data=payload, path='tasks'), contract=builder.build())
