'Creates OperationContract for deleteServerGroup.
To verify the operation, we just check that the Kubernetes container
is no longer visible (or is in the process of terminating).'

def delete_server_group(self, version='v000'):

    bindings = self.bindings
    group_name = frigga.Naming.server_group(app=self.TEST_APP, stack=bindings['TEST_STACK'], version=version)
    payload = self.agent.make_json_payload_from_kwargs(job=[{'cloudProvider': 'kubernetes', 'type': 'destroyServerGroup', 'account': bindings['SPINNAKER_KUBERNETES_ACCOUNT'], 'credentials': bindings['SPINNAKER_KUBERNETES_ACCOUNT'], 'user': '[anonymous]', 'serverGroupName': group_name, 'asgName': group_name, 'regions': [self.TEST_NAMESPACE], 'namespace': self.TEST_NAMESPACE, 'region': self.TEST_NAMESPACE, 'zones': [self.TEST_NAMESPACE], 'interestingHealthProviderNames': ['KubernetesService']}], application=self.TEST_APP, description=('Destroy    Server    Group:    ' + group_name))
    builder = kube.KubeContractBuilder(self.kube_observer)
    builder.new_clause_builder('Replica    Set    Removed').get_resources('rs', extra_args=[group_name, '--namespace', self.TEST_NAMESPACE], no_resource_ok=True).contains_path_eq('targetSize', 0)
    return st.OperationContract(self.new_post_operation(title='delete_server_group', data=payload, path='tasks'), contract=builder.build())
