func TestDelete(t *testing.T) { var apiServer = testUtil.CreateDeleteTestRequestServer(t, token, "/other") defer apiServer.Close() err := misc.Delete(apiServer.URL+"/other", token, *http.DefaultClient) testUtil.IsNil(t, err) }
// DeleteFloatingIP will issue a delete query to delete the floating ip. func (computeService Service) DeleteFloatingIP(floatingIPID string) (err error) { reqURL, err := computeService.buildRequestURL("/os-floating-ips/", floatingIPID) if err != nil { return err } return misc.Delete(reqURL, computeService.authenticator) }
// DeleteInstance will issue a delete query to delete the specified database instance. func (databaseService Service) DeleteInstance(instanceID string) (err error) { reqURL, err := databaseService.buildRequestURL("/instances/", instanceID) if err != nil { return err } return misc.Delete(reqURL, databaseService.authenticator) }
// DeleteSecurityGroupRule will issue a delete query to delete the specified security group rule. func (computeService Service) DeleteSecurityGroupRule(securityGroupRuleID string) (err error) { reqURL, err := computeService.buildRequestURL("/os-security-group-rules/", securityGroupRuleID) if err != nil { return err } return misc.Delete(reqURL, computeService.authenticator) }
// DeletePort issues a DELETE to the specified port url to delete it. func (networkService Service) DeletePort(id string) error { reqURL, err := networkService.buildRequestURL("/ports/", id) if err != nil { return err } return misc.Delete(reqURL, networkService.authenticator) }
// DeleteBackup will issue a delete query to delete the specified backup. func (databaseService Service) DeleteBackup(backupID string) (err error) { reqURL, err := databaseService.buildRequestURL("/backups/", backupID) if err != nil { return err } return misc.Delete(reqURL, databaseService.authenticator) }
// DeleteRouter will issue a delete query to delete the specified security group. func (networkService Service) DeleteRouter(routerID string) (err error) { reqURL, err := networkService.buildRequestURL("/routers/", routerID) if err != nil { return err } return misc.Delete(reqURL, networkService.authenticator) }
// DeleteSecurityGroup will issue a delete query to delete the specified security group. func (networkService Service) DeleteSecurityGroup(securityGroupID string) (err error) { reqURL, err := networkService.buildRequestURL("/security-groups/", securityGroupID) if err != nil { return err } return misc.Delete(reqURL, networkService.authenticator) }
// DeleteVolume will delete the volume by id. func (blockStorageService Service) DeleteVolume(id string) (err error) { reqURL, err := blockStorageService.buildRequestURL("/volumes/", id) if err != nil { return err } return misc.Delete(reqURL, blockStorageService.authenticator) }