// RemoveStaticRouteAt スタティックルート設定 削除
977563
func (s *VPCRouterSetting) RemoveStaticRouteAt(index int) {
	if s.StaticRoutes == nil {
		return
	}

	if s.StaticRoutes.Config == nil || len(s.StaticRoutes.Config) == 0 {
		s.StaticRoutes.Enabled = "False"
		return
	}

	if index < len(s.StaticRoutes.Config) {
		c := s.StaticRoutes.Config[index]
		s.RemoveStaticRoute(c.Prefix, c.NextHop)
	}
}
862964
func (_m *ClientInterface) RemoveHost(hostID string) error {
	ret := _m.Called(hostID)

	var r0 error
	if rf, ok := ret.Get(0).(func(string) error); ok {
		r0 = rf(hostID)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
611958
func (m *manager) RemoveOrphanedStatuses(podUIDs map[types.UID]bool) {
	m.podStatusesLock.Lock()
	defer m.podStatusesLock.Unlock()
	for key := range m.podStatuses {
		if _, ok := podUIDs[key]; !ok {
			klog.V(5).Infof("Removing %q from status map.", key)
			delete(m.podStatuses, key)
		}
	}
}
1346691
func (s *VPCService) DeleteStaticRoute(p *DeleteStaticRouteParams) (*DeleteStaticRouteResponse, error) {
	resp, err := s.cs.newRequest("deleteStaticRoute", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r DeleteStaticRouteResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	// If we have a async client, we need to wait for the async result
	if s.cs.async {
		b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout)
		if err != nil {
			if err == AsyncTimeoutErr {
				return &r, err
			}
			return nil, err
		}

		if err := json.Unmarshal(b, &r); err != nil {
			return nil, err
		}
	}

	return &r, nil
}
1275473
func (c *connectionTracker) RemoveConnection(conn net.Conn) {
	c.lock.Lock()
	defer c.lock.Unlock()
	delete(c.conns, conn)
}
1165911
func (api UsersAPI) RemoveTOTP(w http.ResponseWriter, r *http.Request) {
	username := mux.Vars(r)["username"]

	valMngr := validationdb.NewManager(r)
	hasValidatedPhones, err := valMngr.HasValidatedPhones(username)
	if err != nil {
		log.Error(err)
		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
		return
	}
	if !hasValidatedPhones {
		w.WriteHeader(http.StatusConflict)
		return
	}
	totpMgr := totp.NewManager(r)
	err = totpMgr.Remove(username)
	if err != nil && !totpMgr.IsErrNotFound(err) {
		log.Error(err)
		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
		return
	}
	// if the err is an error not found, there was nothing in the first place
	w.WriteHeader(http.StatusNoContent)
}
1021874
func (s *sandbox) removeNetwork() error {
	netHandle, err := netlink.NewHandle(unix.NETLINK_ROUTE)
	if err != nil {
		return err
	}
	defer netHandle.Delete()

	for _, iface := range s.network.ifaces {
		if _, err := s.removeInterface(netHandle, iface); err != nil {
			return grpcStatus.Errorf(codes.Internal, "Could not remove network interface %v: %v",
				iface, err)
		}
	}

	return nil
}
1312679
func (s *VPCRouterSetting) AddStaticRoute(prefix string, nextHop string) (int, *VPCRouterStaticRoutesConfig) {
	if s.StaticRoutes == nil {
		s.StaticRoutes = &VPCRouterStaticRoutes{
			Enabled: "True",
		}
	}
	if s.StaticRoutes.Config == nil {
		s.StaticRoutes.Config = []*VPCRouterStaticRoutesConfig{}
	}

	c := &VPCRouterStaticRoutesConfig{
		Prefix:  prefix,
		NextHop: nextHop,
	}
	s.StaticRoutes.Config = append(s.StaticRoutes.Config, c)
	return len(s.StaticRoutes.Config) - 1, c
}
607231
func (s *VPCService) ListStaticRoutes(p *ListStaticRoutesParams) (*ListStaticRoutesResponse, error) {
	resp, err := s.cs.newRequest("listStaticRoutes", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r ListStaticRoutesResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	return &r, nil
}
919858
func (gw *realEPManager) removeDatapathMapping(endpointID uint16) error {
	return policymap.RemoveGlobalMapping(uint32(endpointID))
}
558985
func (c *Client) RemoveServiceTemplate(serviceTemplateID string) error {
	if err := c.call("RemoveServiceTemplate", serviceTemplateID, nil); err != nil {
		return err
	}
	return nil

}
1115164
func (d *Daemon) RemoveProxyRedirect(e *endpoint.Endpoint, id string, proxyWaitGroup *completion.WaitGroup) (error, revert.FinalizeFunc, revert.RevertFunc) {
	if d.l7Proxy == nil {
		return nil, nil, nil
	}

	log.WithFields(logrus.Fields{
		logfields.EndpointID: e.ID,
		logfields.L4PolicyID: id,
	}).Debug("Removing redirect to endpoint")
	return d.l7Proxy.RemoveRedirect(id, proxyWaitGroup)
}
623517
func (s *VPCRouterSetting) RemoveStaticNATAt(index int) {
	if s.StaticNAT == nil {
		return
	}

	if s.StaticNAT.Config == nil || len(s.StaticNAT.Config) == 0 {
		s.StaticNAT.Enabled = "False"
		return
	}

	if index < len(s.StaticNAT.Config) {
		c := s.StaticNAT.Config[index]
		s.RemoveStaticNAT(c.GlobalAddress, c.PrivateAddress)
	}
}
1002523
func (_m *ClientInterface) RemoveServiceTemplate(serviceTemplateID string) error {
	ret := _m.Called(serviceTemplateID)

	var r0 error
	if rf, ok := ret.Get(0).(func(string) error); ok {
		r0 = rf(serviceTemplateID)
	} else {
		r0 = ret.Error(0)
	}

	return r0
}
419341
func (s *RouterService) DestroyRouter(p *DestroyRouterParams) (*DestroyRouterResponse, error) {
	resp, err := s.cs.newRequest("destroyRouter", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r DestroyRouterResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	// If we have a async client, we need to wait for the async result
	if s.cs.async {
		b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout)
		if err != nil {
			if err == AsyncTimeoutErr {
				return &r, err
			}
			return nil, err
		}

		b, err = getRawValue(b)
		if err != nil {
			return nil, err
		}

		if err := json.Unmarshal(b, &r); err != nil {
			return nil, err
		}
	}

	return &r, nil
}
5923
func (m *MobileGatewaySIMRoutes) DeleteSIMRouteAt(index int) bool {
	if m.SIMRoutes == nil {
		return false
	}

	if index < len(m.SIMRoutes) {
		s := m.SIMRoutes[index]
		if simID, err := strconv.ParseInt(s.ResourceID, 10, 64); err == nil {
			return m.DeleteSIMRoute(simID, s.Prefix)
		}
	}
	return false
}
1274682
func (r Ticket) RemoveAttachedHardware(hardwareId *int) (resp bool, err error) {
	params := []interface{}{
		hardwareId,
	}
	err = r.Session.DoRequest("SoftLayer_Ticket", "removeAttachedHardware", params, &r.Options, &resp)
	return
}