Delete the customer profile remotely and locally
516633
def delete(self):
        """"""
        response = delete_profile(self.profile_id)
        response.raise_if_error()
        super(CustomerProfile, self).delete()
992438
def _delete_vlan_profile(self, handle, vlan_id, ucsm_ip):
        """"""
        vlan_name = self.make_vlan_name(vlan_id)
        vlan_profile_dest = (const.VLAN_PATH + const.VLAN_PROFILE_PATH_PREFIX +
                             vlan_name)
        try:
            handle.StartTransaction()
            obj = handle.GetManagedObject(
                None,
                self.ucsmsdk.FabricVlan.ClassId(),
                {self.ucsmsdk.FabricVlan.DN: vlan_profile_dest})

            if obj:
                handle.RemoveManagedObject(obj)

            handle.CompleteTransaction()

        except Exception as e:
            # Raise a Neutron exception. Include a description of
            # the original  exception.
            raise cexc.UcsmConfigFailed(config=vlan_id,
                                        ucsm_ip=ucsm_ip, exc=e)
1288841
def delete(config, username, type):
        """"""
        client = Client()
        client.prepare_connection()
        user_api = API(client)
        user_api.delete(username, type)
151457
function performRemove() {
        UserService.remove(vm.user)
          .then(deleteUserSuccess)
          .catch(deleteUserCatch);

        function deleteUserSuccess() {
          Toast.show({type: 'success', text: 'User ' + vm.displayName + ' deleted'});
          vm.showList();
        }

        function deleteUserCatch(err) {
          Toast.show({
            type: 'warn',
            text: 'Error while deleting user ' + vm.displayName,
            link: {state: $state.$current, params: $stateParams}
          });

          if (form && err) {
            form.setResponseErrors(err, vm.errors);
          }
        }
      }
1342962
def delete(self, username, type):
        """"""
        self.client.delete(self.__distinguished_name(type, username=username))
877724
def remove_network_profile(self, obj, params):
        """"""

        self._logger.debug("delete profile: %s", params.ssid)
        str_buf = create_unicode_buffer(params.ssid)
        ret = self._wlan_delete_profile(self._handle, obj['guid'], str_buf)
        self._logger.debug("delete result %d", ret)
110021
def remove_profile(project_root)
      # Choose a profile from the availables
      profiles = Bebox::Profile.list(project_root)
      # Get a profile if exist
      if profiles.count > 0
        profile = choose_option(profiles, _('wizard.choose_remove_profile'))
      else
        return error _('wizard.profile.no_deletion_profiles')
      end
      # Ask for deletion confirmation
      return warn(_('wizard.no_changes')) unless confirm_action?(_('wizard.profile.confirm_deletion'))
      # Profile deletion
      profile_name = profile.split('/').last
      profile_base_path = profile.split('/')[0...-1].join('/')
      profile = Bebox::Profile.new(profile_name, project_root, profile_base_path)
      output = profile.remove
      ok _('wizard.profile.deletion_success')
      return output
    end
171426
def cli(obj, customer, match, delete):
    """"""
    client = obj['client']
    if delete:
        client.delete_customer(delete)
    else:
        if not customer:
            raise click.UsageError('Missing option "--customer".')
        if not match:
            raise click.UsageError('Missing option "--org" / "--group" / "--domain" / "--role".')
        try:
            customer = client.create_customer(customer, match)
        except Exception as e:
            click.echo('ERROR: {}'.format(e))
            sys.exit(1)
        click.echo(customer.id)
82049
def delete(options = {})
      options = options.merge(user_name: @user_name)
      resp = @client.delete_login_profile(options)
      resp.data
    end
813057
private UserProfile removeUserProfile(Session session, String userName, boolean broadcast) throws Exception
   {
      Node profileNode;
      try
      {
         profileNode = utils.getProfileNode(session, userName);
      }
      catch (PathNotFoundException e)
      {
         return null;
      }

      UserProfile profile = readProfile(userName, profileNode);

      if (broadcast)
      {
         preDelete(profile, broadcast);
      }

      profileNode.remove();
      session.save();

      removeFromCache(profile);

      if (broadcast)
      {
         postDelete(profile);
      }

      return profile;
   }
968944
def cli(env, identifier, credential_id):
    """"""

    mgr = SoftLayer.ObjectStorageManager(env.client)
    credential = mgr.delete_credential(identifier, credential_id=credential_id)

    env.fout(credential)
1043280
@RequestMapping(value = "/api/profile/{profileIdentifier}/clients/delete", method = RequestMethod.POST)
    public
    @ResponseBody
    HashMap<String, Object> deleteClient(Model model,
                                         @RequestParam("profileIdentifier") String profileIdentifier,
                                         @RequestParam("clientUUID") String[] clientUUID) throws Exception {

        logger.info("Attempting to remove clients from the profile: ", profileIdentifier);
        logger.info("Attempting to remove the following clients: {}", Arrays.toString(clientUUID));

        HashMap<String, Object> valueHash = new HashMap<String, Object>();
        Integer profileId = ControllerUtils.convertProfileIdentifier(profileIdentifier);

        for( int i = 0; i < clientUUID.length; i++ )
        {
            if (clientUUID[i].compareTo(Constants.PROFILE_CLIENT_DEFAULT_ID) == 0)
                throw new Exception("Default client cannot be deleted");

            clientService.remove(profileId, clientUUID[i]);
        }

        valueHash.put("clients", clientService.findAllClients(profileId));
        return valueHash;
    }
1164743
public function cleanSession()
    {
        // remove checkout session parameters
        $this->session->remove('select-delivery');
        $this->session->remove('delivery-id');
        $this->session->remove('existing-delivery-address');
        $this->session->remove('transaction-id');

        // abandon cart
        $this->cartProvider->abandonCart();
    }
326668
def delete_customer(self, customer_id):
		""""""
		content = self._fetch("/customer/%s" % customer_id, method="DELETE")
		return self._status(content)
634287
def delete(self, customer_id, token_id, data={}, **kwargs):
        "
        url = "{}/{}/tokens/{}".format(self.base_url, customer_id, token_id)
        return self.delete_url(url, data, **kwargs)
534521
def remove_all_network_profiles(self, obj):
        """"""

        profile_name_list = self.network_profile_name_list(obj)

        for profile_name in profile_name_list:
            self._logger.debug("delete profile: %s", profile_name)
            str_buf = create_unicode_buffer(profile_name)
            ret = self._wlan_delete_profile(self._handle, obj['guid'], str_buf)
            self._logger.debug("delete result %d", ret)
406875
public function actionRemove()
    {
        $username = $this->prompt('Username:', ['required' => true]);
        $user = $this->findModel($username);
        $this->log($this->repository->remove($user));
    }