Menu

#259 more CLI flaws

HEAD
open-postponed
backend (19)
1
2006-10-02
2006-09-18
No

This is a followup to bug "[ 1536167 ] bug in
ispman.add_vhost".

As it turned out there are even more "internal" cli
tools, that are used for tasks operations only and must
not (!) be used by humans.

IMHO this is bad design.
I'll modify the tasks to use the logic of the interface
libraries (lib/*.lib) directly and remove the obsoleted
cli tools.

Discussion

  • Atif Ghaffar

    Atif Ghaffar - 2006-09-19

    Logged In: YES
    user_id=7978

    Hello Joerg,

    Sorry I do not agree on this.

    The library does a task (a set of tasks). This is called
    automation.

    Automation only works if there are pre-defined tasks to do
    which should take place.

    This is by design. Its there to make the system not a black-box.

    We tell the system (agent) to do what we should do manually
    in case the agent did not existed.

     
  • Joerg Delker

    Joerg Delker - 2006-09-24
    • status: open --> pending
     
  • Joerg Delker

    Joerg Delker - 2006-09-24

    Logged In: YES
    user_id=43997

    Hey Atif,

    I'm not sure if I understand your comment correctly.
    I don't doubt the task mechansim. It's a nice way to define
    what is do be done for a particular ispman task.

    What I have problems with is how a task calls the particular
    actions.
    For available CLI tools in the bin dir, it just invokes the
    tools with proper params. From a software design perspective
    that's a bit akward, but I agree that it is easier to
    understand the process.
    So, as long as the particular CLI bin is usable for manual
    invokation, that's ok, but there were/are some CLI bins that
    serve just internal puproses.
    For example see ispman.addvhost (used for adding a new vhost
    to ispman) and ispman.add_vhost (used for manipulating the
    vhost hash, which is very internal!).
    There were/are also task that invoke several system commands
    directly.
    This circumvents the entire lib mechanism (e.g. for creating
    directories).
    Actually this was/is the cause for some bugs, because the
    tasks and CLI tools don't use the same code base anymore.

    Therefor, I found it a better (and still transparent)
    solution to use the particular service libs. This finally
    ensures that tasks and CLI use the same logic.

    Joerg

     
  • Atif Ghaffar

    Atif Ghaffar - 2006-09-24

    Logged In: YES
    user_id=7978

    Hi Joerg,

    Thanks for clarifying this.
    I do agree then with you that internal logic should be
    implemented in the libs. In fact as you mentioned, it is.
    The scripts are just a wrapper that check the parameters.

    I forgot to mention (actually I forgot completely) that the
    reason for these scripts are to allow other systems to
    interact with or control the ispman system. For example a
    billing system can call ispman.addvhost when a bill is paid
    for a certain domain. Actually I have a customer who is
    doing just that.

    I do agree with you though that this gets confusing. Perhaps
    I should provide a multi-purpose command shell to interact
    with other systems. This can be via SOAP or just via place
    rsh/ssh/cli.

    best regards
    --
    Atif Ghaffar

     
  • Joerg Delker

    Joerg Delker - 2006-09-24

    Logged In: YES
    user_id=43997

    Hi Atif,

    alright, that makes much more sense now.

    For 3rd-party-interaction a generic command interface
    (shell, soap, ...) sounds like a very good idea.

     
  • Joerg Delker

    Joerg Delker - 2006-09-24
    • status: pending --> open
     
  • Joerg Delker

    Joerg Delker - 2006-10-02
    • priority: 5 --> 1
    • status: open --> open-postponed
     

Log in to post a comment.