AppLogic 2.4 Documentation The latest production release is AppLogic 3.0.30
Class Management Commands
The following commands are supported:
list
| Description: | List classes in a package |
| Syntax: | class list package [ --batch ] [ --verbose ] |
| Arguments: | package | Name of package for which to list classes. package may be one of the following: |
| application - list singleton classes of application |
| application/catalog - list classes in local catalog |
| /catalog - list classes in global catalog |
| --batch | Display output in UDL format |
| --verbose | Display total volume size for each class as well as protocols. |
| Examples: | class list sugarcrm - List classes of application |
| class list sugarcrm/local - List classes of application local catalog |
| class list /system - List classes of global catalog |
| Notes: | A specification of the output of this command can be foundhere. |
Typical Output
Classes in catalog 'system':
Class Category Description
--------------------------------------------------------------------------------
HALB Switches Reliable, high-performance TCP/HTTP load balancer with HTTP session support based on HAProxy 1.2.28 (v1.0.1-1)
HLB Switches Session-aware HTTP Load Balancer (v2.4.0-1)
IN Gateways Input Gateway Appliance - iptables based incoming connection gateway with firewall (v2.4.0-1)
INSSL Gateways Input Gateway Appliance - iptables based incoming connection gateway with firewall and SSL support (v1.3.0-1)
INSSLR Gateways Redundant Input Gateway Appliance - iptables based incoming connection gateway with firewall, SSL and failover support (v1.0.1-1)
LINUX5 Generic Generic Linux Server - based on CentOS 5 (v1.2.0-1)
LINUX64 Generic Generic Linux Server - based on CentOS 5 (64bit) (v1.2.0-1)
LOAD Misc. Appliances Load Generator (v1.2.0-1)
LUX5 Generic Generic CentOS 5 Linux-based appliance (v1.2.0-1)
LUX64 Generic Generic 64-bit Centos 5-based appliance (v1.2.0-1)
MON Monitoring Monitoring appliance (v1.3.2-1)
MYSQLR Database Appliances MYSQL database appliance with replication capabilities based on mysql 5.0.45 (v1.4.1-1)
MYSQL5 Database Appliances MYSQL Database appliance based on mysql 5.0.22 (v1.2.0-1)
MYSQL64 Database Appliances 64-bit MYSQL appliance based on mysql 5.0.22 (v1.2.0-1)
NAS Misc. Appliances NAS Appliance - provides file storage accessible over HTTP and CIFS file protocols (v2.4.0-1)
NET Gateways Subnet Output Gateway Appliance - iptables based output gateway with firewall (v2.4.0-1)
OSOL64 Generic Generic OpenSolaris Server - based on OpenSolaris build 2008.05 (v1.0.4-1)
OUT Gateways Single Host Output Gateway Appliance - iptables based output gateway with firewall (v2.4.0-1)
PGSQL Database Appliances PGSQL Database appliance based on PostgreSQL 8.2.9 (v1.1.0-1)
PS8 Switches Cascadable Port switch for distributing TCP and UDP traffic to different outputs depending on the TCP/UDP port (v1.2.0-1)
RPL Switches Replicator appliance - replicates HTTP requests received on its input terminal to all its output terminals (v1.2.0-1)
SOL10 Generic Generic Solaris 10 Server - based on Solaris 10 build GA (v1.0.3-1)
WEBx4 Web Servers Scalable web server (v1.1.2-1)
WEBx8 Web Servers Scalable web server (v1.1.2-1)
WEB4 Web Servers Simple Web Server - based on CentOS 5; Apache, PHP4, mod_perl, and MYSQL Client libs installed (v1.2.0-1)
WEB5 Web Servers Simple Web Server - based on CentOS 5; Apache, PHP5, mod_perl,and MYSQL Client libs installed (v1.2.0-1)
WEB64 Web Servers Simple Web Server - based on CentOS 5 64-bit; Apache, PHP5, mod_perl, and MYSQL Client libs installed (v1.2.0-1)
move
| Description: | Move a class from one package to another and/or rename the class. |
| Syntax: | class move source destination |
| Arguments: | source | Name of class that is to be moved |
| destination | New class name |
| Examples: | class move /system:NAS sugarcrm/local:NAS - move class from global catalog to local application catalog |
| class move /system:NAS sugarcrm:NAS - move class from global catalog to application singleton |
| class move sugarcrm:NAS /system:NAS - move application singleton class to global catalog |
| Notes: | The move command can move a class: |
| a) from one catalog to another; |
| b) from a catalog to a singleton; |
| c) from singleton to application catalog class. |
| The move command can be used to rename a class within a catalog and/or the application package. |
| Note that a singleton assembly (an assembly class in the application package) cannot be moved to a catalog if any of its subordinates is a singleton. This is because having a singleton subordinate would prevent the instantiation of such class. |
| Also note that moving a class will not automatically change the .class attribute of subordinates using this class - this needs to be done manually in all affected assemblies. |
copy
| Description: | Copy a class from one package to another. |
| Syntax: | class copy source destination |
| Arguments: | source | Name of class that is to be copied |
| destination | New class name |
| Examples: | class copy /system:NAS sugarcrm/local:NAS - copy class from global catalog to local application catalog |
| class copy /system:NAS sugarcrm:NAS - copy class from global catalog to application singleton |
| class copy sugarcrm:NAS /system:NAS - copy application singleton class to global catalog |
| Notes: | Classes can be copied: |
| a) from one catalog to another, |
| b) from a catalog to an application singleton, |
| c) from application singleton to a catalog. |
destroy
| Description: | Delete a class and all its class volumes from a catalog or application. |
| Syntax: | class destroy class [ --force ] |
| Arguments: | class | Name of the class to be deleted; the class may be in a global catalog, application-specific catalog, or it may be a singleton. |
| --force | option to skip the confirmation prompt |
| Examples: | class destroy sugarcrm:NAS - Destroy application singleton class |
| class destroy sugarcrm/local:NAS - Destroy application local catalog class |
| class destroy /system:NAS - Destroy global catalog class |
| Notes: | Instances of the deleted class are not automatically deleted from any application. |
export
| Description: | Export a class |
| Syntax: | class export class dir [ --force ] [ --nocompress ] |
| Arguments: | class | name of class to be exported. May specify one of the following: |
| application/catalog:class - export local application catalog class |
| /catalog:class - export global catalog class |
| dir | Name of exchange directory relative to /vol/_impex where class is to be exported to |
| --force | Option to allow exporting of class even if it is already present (i.e., the class is removed and then exported) |
| --nocompress | Do not compress class volumes. |
| Examples: | class export sugarcrm/local:NAS nas - Export application local catalog class |
| class export /system:NAS nas - Export global catalog class |
| Notes: | None. |
import
| Description: | Import a class |
| Syntax: | class import class dir [user=user [pwd=-]] [ --force ] |
| Arguments: | class | name of class to be imported. May specify one of the following: |
| application/catalog:class - import local application catalog class |
| /catalog:class - import global catalog class |
| dir | Name of exchange directory from which the class is to be imported. The directory may be one of the following: - directory relative to /vol/_impex - URL with the following format 'http://path'. |
| user | user name to use for authentication with the remote server |
| pwd=- | (Optional) Prompt for password to use for authentication purposes when importing the class from a URL. If the standard input is not a terminal device, it will not print a prompt and expect only one copy of the password on 'stdin' (this can be used for batch operations, to set the password from a file). |
| --force | Option to allow importing of class even if it is already present (i.e., the class is removed and then imported) |
| Examples: | class import sugarcrm/local:NAS nas - Import application local catalog class |
| class import /system:NAS nas - Import global catalog class |
| Notes: | None. |
get_desc
| Description: | Display class descriptor |
| Syntax: | class get_desc class |
| Arguments: | class | name of class for which to display descriptor May specify one of the following: |
| application:class - display application singleton class descriptor |
| application/catalog:class - display application local catalog class descriptor |
| /catalog:class - display global catalog class descriptor |
| Examples: | class get_desc /system:MYCLASS - display global catalog class descriptor |
| class get_desc myapp:MYCLASS - display application singleton class descriptor |
| Notes: | None. |
put_desc
| Description: | Modify class descriptor |
| Syntax: | class put_desc class |
| Arguments: | class | name of class for which to modify descriptor May specify one of the following: |
| application:class - modify application singleton class descriptor |
| application/catalog:class - modify application local catalog class descriptor |
| /catalog:class - modify global catalog class descriptor |
| Examples: | class put_desc /system:MYCLASS - modify global catalog class descriptor |
| class put_desc myapp:MYCLASS - modify application singleton class descriptor |
| Notes: | The new descriptor is obtained from standard input. The user can type in or paste the new descriptor contents followed by typing CTRL-d to terminate the input. |
| The name of the class may not be changed within the new descriptor. |
| The locked attribute may not be changed within the new descriptor if executed by a non-maintainer. |
| If the operation is executed remotely, the command can be specified as follows: ssh root@controllerhost class put_desc myapp:MYCLASS < newdesc where newdesc is a file containing the modified descriptor. |
lock
| Description: | lock a class |
| Syntax: | class lock class [pwd=->/tt> ] |
| Arguments: | class | name of class to be locked May specify one of the following: |
| application:class - lock application singleton class |
| /catalog:class - lock global catalog class |
| pwd=- | Prompt for the password used to unlock the class. If the standard input is not a terminal device, it will not print a prompt and expect only one copy of the password on 'stdin' (this can be used for batch operations, to set the password from a file). |
| Examples: | class lock /system:MYCLASS - Lock global catalog class |
| class lock myapp:MYCLASS - Lock application singleton class |
| class lock my-app:MYSQL2 pwd=- - lock singleton class and prompt for password |
| Notes: | The 'pwd' argument is required when executed by a non-maintainer. |
| If the 'pwd' argument is specified, it is required in order to unlock the class. |
When a class is locked, the following operations cannot be executed by non-maintainers: * class branch * class copy * class move * class get_desc * export of class or catalog/application containing the class * managing/modifying/reading of class volumes |
| See Application and Class Locking Reference for more information. |
unlock
| Description: | unlock a class |
| Syntax: | class unlock class [ pwd=- ] [ --override ] |
| Arguments: | class | name of class to be unlocked May specify one of the following: |
| application:class - lock application singleton class |
| /catalog:class - lock global catalog class |
| pwd=- | Prompt the user for the password that was provided when the class was locked. If the standard input is not a terminal device, it will not print a prompt and expect only one copy of the password on 'stdin' (this can be used for batch operations, to set the password from a file). |
| --override | (for maintainers only) Override the lock on the class. |
| Examples: | class unlock /system:MYCLASS - Unlock global catalog class |
| class unlock myapp:MYCLASS - Unlock application singleton class |
| class unlock my-app:MYSQL2 pwd=- - Unlock singleton class and prompt for password |
| Notes: | If the class was locked with a password, the passwords must match |
| If the class was locked without a password, then only a maintainer may unlock the class |
| See Application and Class Locking Reference for more information. |
migrate
| Description: | Migrate a class from/to a remote grid |
| Syntax: | class migrate remote_grid class [ .name=newclass ] [ --export | --import ] [ --nocompress ] [ --nocleanup ] [ --debug ] |
| Arguments: | remote_grid | Name of remote grid |
| class | Name of the class to migrate. The class may be in a global or local catalog or may be a singleton. |
| .name=newclass | Optional new name for migrated class. The name may refer to a global or local catalog or may refer to a singleton. |
| --export | Migrate the class TO the remote grid. |
| --import | Migrate the class FROM the remote grid. |
| --nocompress | Do not compress class volumes during migration. This option is useful when migrating classes that have large volumes. |
| --nocleanup | skip cleanup upon failure or completion (troubleshooting) |
| --debug | show debug information during migration (troubleshooting) |
| Examples: | class migrate myoldgrid.3tera.net /mycat:myclass - migrate catalog class to the current grid. |
| class migrate myoldgrid.3tera.net /mycat:myclass .name=myapp:myclass - migrate catalog class to the current grid as an application singleton. |
| class migrate mynewgrid.3tera.net /myapp/local:myclass .name=/mycat:myclass --export - migrate local catalog class to the remote grid as a global catalog class. |
| Notes: | If neither the --export or --import options are specified, the class is migrated FROM the remote grid. |
| The class MUST NOT exist on the destination grid. |
| When accessing the grid via SSH, SSH agent and agent forwarding must be enabled on the client machine for the remote grid access to work. In addition, either the user's and/or the grid's public SSH key must also be installed on the remote grid in order to set up a "trust" between the two grids. |
| The --nocompress option is useful when migrating classes that have very large volumes. |
-- BeckyH - 23 May 2006
Copyright © CA 2005-2011. All Rights Reserved.