code: def delete_service_network(self, tenant_name, network):
          
  
          network_info = {}
          part_name = network.part_name
          if not part_name:
              part_name = self._part_name
          seg_id = str(network.segmentation_id)
          if network.vlan:
              vlan_id = str(network.vlan)
              if network.mob_domain_name is not None:
                  mob_domain_name = network.mob_domain_name
              else:
                  # The current way will not work since _default_md is obtained
                  # during create_service_network. It's preferrable to get it
                  # during init TODO(padkrish)
                  if self._default_md is None:
                      self._set_default_mobility_domain()
                  mob_domain_name = self._default_md
              network_info = {
                  'organizationName': tenant_name,
                  'partitionName': part_name,
                  'mobDomainName': mob_domain_name,
                  'vlanId': vlan_id,
                  'segmentId': seg_id,
              }
          else:
              network_info = {
                  'organizationName': tenant_name,
                  'partitionName': part_name,
                  'segmentId': seg_id,
              }
          LOG.debug("Deleting %s network in DCNM.", network_info)
  
          res = self._delete_network(network_info)
          if res and res.status_code in self._resp_ok:
              LOG.debug("Deleted %s network in DCNM.", network_info)
          else:
              LOG.error("Failed to delete %s network in DCNM.",
                        network_info)
              raise dexc.DfaClientRequestFailed(reason=self._failure_msg(res))
docs: Delete service network on the DCNM.
  
          :param tenant_name: name of tenant the network belongs to
          :param network: object that contains network parameters