Previous Topic: Catalog ManagementNext Topic: User Management


Class Management

This section contains the following topics:

class copy

class destroy

class export

class get_desc

class import

class list

class lock

class migrate

class move

class put_desc

class unlock

class copy

Copy a class from one package to another. You can copy a class as follows:

Syntax
class copy <src> <dst> [ store=<store> ]
Options:
<src>

Name of class that is to be copied

<dst>

Name of new class

<store>

Specifies the volume store where volumes are created.May be set to one of the following values:

local - store volumes on local server storage

san - store volumes on a SAN

Examples
class copy my-app:DBASE my-app/local:DBASE

copy application singleton to local catalog

                                                   
class copy my-app/local:DBASE /system:DBASE

copy local catalog to global catalog

                                                   
class copy /system:MYSQL5 my-app:DBASE        

copy global catalog to application singleton

class destroy

Delete a class and all its class volumes from a catalog or application.

Syntax
class destroy class [ --force ]  
Parameters
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 lamp:NAS

Destroy application singleton class

class destroy lamp/local:NAS

Destroy application local catalog class

class destroy /system:NAS

Destroy global catalog class

Note: Instances of the deleted class are not automatically deleted from any application.

class export

Export a class.

Syntax
class export class dir [ --force ] [ --nocompress ]  
Parameters
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 (that is, 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

class get_desc

Display class descriptor.

Syntax
class get_desc class  
Parameters
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

class import

Import a class to a package.

Syntax
class import <class> <dir> [ store=<store> ] [--force] [ user=<user> [ pwd=- ] ]  
Parameters
<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'.

<store>

Specifies the volume store where volumes are created. May be set to one of the following values:

local - store volumes on local server storage

san - store volumes on a SAN

--force

Option to allow importing of class even if it is already present (that is, the class is removed and then imported)

user=<user>

Name of user to use for authentication purposes when importing the class from a URL

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).

Examples
class import /system:MYSQL5 mysql5 

import 'MYSQL5' class to global catalog

class import my-app/local:MYSQL mysql

import 'MYSQL' class to local catalog of application 'my-app'



class list

List classes in a package.

Syntax
class list package [ --batch ] [ --verbose ]  
Parameters
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 and 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 found here.

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)
   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)
   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)
class list Output

The output of this command when listing the contents of a catalog is a table with the following headings:

If --batch option is specified, the output is the following (volume size and protocols are listed if --verbose is specified):

catalog <name>
   {
   class <name> : category="<val>", vol_sz=<val>, [locked,] description="<val>"
   ...

   protocol <name> : filter="<val>"
   ...
   }
class lock

Lock a class.

Syntax
class lock class [pwd=->/tt> ]  
Parameters
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

Note: The 'pwd' argument is required when executed by a non-maintainer.

If the 'pwd' argument is specified, it is required to unlock the class.

When a class is locked, the following operations cannot be executed by non-maintainers:

See Application and Class Locking Reference for more information.

class migrate

Migrate a class from/to a remote grid.

Syntax
class migrate <remote_grid> <class> [ .name=<new name>] [.store=<store>] [<option>]*
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=<new name>

New name for the migrated class. The name may refer to a global or local catalog or may refer to a singleton.

.store=<store>

Specifies the volume store where volumes are created. May be set to one of the following values:

local - store volumes on local server storage

san - store volumes on a SAN

Note: the .store option is not available on AppLogic® for System z.

--export

Migrate the class TO the remote grid.

--import

Migrate the class FROM the remote grid.

--nocompress

Do not compress class volumes during migration.

--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:

class move

Move a class from one package to another or rename the class.

Syntax
class move source destination  
Parameters
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 or the application package.

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, 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.

class put_desc

Modify class descriptor.

Syntax
class put_desc class  
Parameters
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

Note: 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, where newdesc is a file containing the modified descriptor:

ssh root@controllerhost class put_desc myapp:MYCLASS <newdesc>
class unlock

Unlock a class.

Syntax
class unlock class [ pwd=- ] [ --override ]  
Parameters
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: