/usr/local/psa/bin/service_plan - usage?

Discussion in 'Plesk Automation Suggestions and Feedback' started by GregHL, Jan 14, 2014.

  1. GregHL

    GregHL Mega Poster

    I'm trying to fix all our plans - it's going to be easier to do this via the command line - but the command /usr/local/psa/bin/service_plan seems to not want to play nicely.

    Seems simple enough - use /usr/local/psa/service_plan - right?


    Usage suggests that I must use the plan name - not ID:

    [root@cppa bin]# ./service_plan -h| more
    Usage: service_plan command <service-plan-name> [options]
        Available commands:
        --create or -c <service-plan-name> Creates a hosting plan.
        --update or -u <service-plan-name> Updates an existing hosting plan.
        --duplicate or -d <service-plan-name>
                                           Duplicates a hosting plan by making
                                           its copy with the name specified in
                                           the '-duplicate-name' option.
        --remove or -r <service-plan-name> Removes a hosting plan.
        --info or -i  <service-plan-name>  Displays information about a hosting
        --xml-info or -x <service-plan-name>
                                           Output the contents of the domain
                                           service plan in XML format
        --help or -h                       Displays this help page.
        --create-default or -def           Creates a default hosting plan.
        --add-aps-filter-item <service_plan_name>
                                           Adds an APS applications filter item.
        --remove-aps-filter-item <service_plan_name>
                                           Removes an APS applications filter
    I've tried:

    /usr/local/psa/bin/service_plan -i my plan name;
    /usr/local/psa/bin/service_plan -i "my plan name";
    /usr/local/psa/bin/service_plan -i 'my plan name';
    /usr/local/psa/bin/service_plan -i "my\ plan\ name";

    all error :

    An error occurred while getting the hosting plan information: There is no such a service plan
    Can we get a version of this command that takes planID rather than name? All our plan names have spaces and dashes and I can't even get the command line controls to recognize a single plan name!
  2. Andrey Dobrenko

    Andrey Dobrenko Odin Team


    In the previous post http://forum.parallels.com/showthre...tion-for-usr-local-psa-bin-domain_pref-please I wrote that not all Plesk command line utilities (/usr/local/psa/bin) are allowed to use in PPA. The reason is very simple. These ones are belong to Plesk and initially were designed for Plesk standalone, not for PPA - distribution environment. PPA is installed in the directory /usr/local/ppa and all public command line utilities exposed by PPA are located here: /usr/local/ppa/bin. The utlity service_plan you are talking about won't work for PPA. Because all service plans, account and subscriptions are stored in PA (Parallels Automation). Plesk Panel is responsible for web/mail hosting only.

    The only way to work w/ service plan is to use PPA OpenAPI for that http://download1.parallels.com/ppa/11.5/docs/en-US/online/ppa_integration_guide/71795.htm#o72887 Going forward, we are going to expose command line utilities for PPA.
    Last edited: Jan 15, 2014
  3. GregHL

    GregHL Mega Poster

    can we get a list of commands in the psa bin that *will* work?
  4. Andrey Dobrenko

    Andrey Dobrenko Odin Team

    You can use native Plesk utilities to manage hosting and mail settings within subscription. The others, for instance, account and service plan management can be done through PPA OpenAPI. In the near future, we are going to expose all Plesk utilities which can work w/ PPA to /usr/local/ppa/bin and you won't think what utilities are supported and what not. The answer will be - all utilities are availalbe in /usr/local/ppa/bin

Share This Page