func (command *commandDelete) Execute(resource *handler.Resource) { securityGroupID := resource.Params.(*paramsDelete).securityGroupID err := securityGroups.Delete(command.Ctx.ServiceClient, securityGroupID).ExtractErr() if err != nil { resource.Err = err return } resource.Result = fmt.Sprintf("Successfully deleted security group [%s]\n", securityGroupID) }
func deleteSecGroup(t *testing.T, groupID string) { res := rsGroups.Delete(Client, groupID) th.AssertNoErr(t, res.Err) t.Logf("Deleted security group %s", groupID) }