Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creación de Colas Simples #93

Open
Wili2023 opened this issue Aug 15, 2023 · 1 comment
Open

Creación de Colas Simples #93

Wili2023 opened this issue Aug 15, 2023 · 1 comment

Comments

@Wili2023
Copy link

Wili2023 commented Aug 15, 2023

Buenas Tardes.
En el ProgramExxamples.cs de Tiknet tenemos el siguiente código.

private static void QueueTreeMerge(ITikConnection connection)
{
var original = connection.LoadAll().Where(q=> q.Name == "Q1" || q.Name == "Q2" || q.Name.StartsWith("Q3"));

        string unique = Guid.NewGuid().ToString();
        List<QueueTree> expected = new List<QueueTree>()
        {
            new QueueTree() { Name = "Q1", Parent = "global", PacketMark = "PM1" },
            new QueueTree() { Name = "Q2", Parent = "global", PacketMark = "PM2", Comment = unique }, //always update
            new QueueTree() { Name = "Q3 " + unique, Parent = "global", PacketMark = "PM3" }, // always insert + delete from previous run
        };

        //Merge with Name as key - can not save via SaveListDifferences because all items in 'expected' are new (.id=null) => insert will be done, not CUD
        connection.CreateMerge(expected, original)            
            .WithKey(queue => queue.Name)
            .Field(q => q.Parent)
            .Field(q => q.PacketMark)
            .Field(q => q.Comment)
            .Save();
    }

Este código crea arboles de colas, lo que necesito es crear una cola simple con sus respectivos parámetros nombre, padre, target, etc, Por favor su ayuda cual seria el código que debería usar para crear colas simples muchas gracias mediante vbnet es el lenguaje que al momento estoy usando.

@Deantwo
Copy link
Contributor

Deantwo commented Mar 5, 2024

I suggest asking on the MikroTik forums instead.
Here: https://forum.mikrotik.com/index.php

Once you know the scripting commands you need to create the simple queue, it becomes much easier to make an API program that does the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants