Exemplo n.º 1
0
Arquivo: delete.go Projeto: flazz/rack
func (command *commandDelete) Execute(resource *handler.Resource) {
	securityGroupRuleID := resource.Params.(*paramsDelete).securityGroupRuleID
	err := securityGroupRules.Delete(command.Ctx.ServiceClient, securityGroupRuleID).ExtractErr()
	if err != nil {
		resource.Err = err
		return
	}
	resource.Result = fmt.Sprintf("Successfully deleted security group rule [%s]\n", securityGroupRuleID)
}
Exemplo n.º 2
0
func deleteSecRule(t *testing.T, id string) {
	res := rsRules.Delete(Client, id)
	th.AssertNoErr(t, res.Err)
	t.Logf("Deleted security rule %s", id)
}