16 | | == About the CMT data(structure) == |
17 | | |
18 | | ... |
| 17 | |
| 18 | = About the CMT data(structure) = |
| 19 | |
| 20 | The datastructure of CMT consists of various models, defined in the [source:trunk/sara_cmt/sara_cmt/cluster/models.py models.py source-file]. |
| 21 | Just like in other [https://www.djangoproject.com/ Django] projects, these models are used as a blueprint for objects in CMT, and for database tables to store these objects in. |
| 22 | There's an interactive shell, included in Django, which you can use for testing queries or looking up the models. |
| 23 | This shell has to be executed with the `manage.py`-file which is a wrapper around Django's command-line utility [https://docs.djangoproject.com/en/dev/ref/django-admin/ django-admin.py] and can be found in the CMT-package directory. |
| 24 | If you are familiar with Django, you might use this shell. |
| 25 | Otherwise we advise you to use one one of the interfaces of CMT. |
| 26 | |
| 27 | {{{ |
| 28 | user@host$ python manage.py shell |
| 29 | }}} |
| 30 | |
| 31 | This will give you an interactive shell with a welcome message. |
| 32 | First thing to do is import the models of `sara_cmt`: |
| 33 | |
| 34 | {{{ |
| 35 | In [1]: from sara_cmt.cluster.models import * |
| 36 | }}} |
| 37 | |
| 38 | The models available in CMT are: |
| 39 | |
| 40 | || '''Model''' || '''Description''' || '''Related to''' || |
| 41 | || Cluster || A labeled group of hardware pieces || || |
| 42 | || !HardwareUnit || A specific piece of hardware || Cluster (n:1) [[BR]] Role (n:n) [[BR]] Network (n:n) [[BR]] !HardwareModel (n:1) [[BR]] !WarrantyContract (n:1) [[BR]] Rack (n:1) [[BR]] Connection (n:1) || |
| 43 | || Interface || An interface of a piece of hardware || Network (n:1) [[BR]] !HardwareUnit (n:1) [[BR]] !InterfaceType (n:1) [[BR]] || |
| 44 | || Network || Information about a network. || Interface (1:n) || |
| 45 | || Rack || A standardized system for mounting various pieces of hardware in a stack of slots. || || |
| 46 | || Country || Countries paired with there country-code || || |
| 47 | || Address || Holds information about the physical location of a piece of hardware. || Country (n:1) || |
| 48 | || Room || Located at an address, this is where a rack of hardware can be found. || || |
| 49 | || Company || This can be linked to hardware, to be able to define contactpersons for a specific piece of hardware || Address (n:n) || |
| 50 | || Connection || These are contacts that can be linked as connections for warranties etc. || Address (n:1) [[BR]] Company (n:1) || |
| 51 | || Telephonenumber || Used for telephonenumbers of contacts. || Country (n:1) [[BR]] Connection (n:1) || |
| 52 | || !HardwareModel || This model is being used to specify some extra information (specifications) about a specific type (model) of hardware || Company (n:1) || |
| 53 | || Role || Describes the role of a piece of hardware in the cluster. || || |
| 54 | || !InterfaceType || Contains information about different types of interfaces || Company (n:1) || |
| 55 | || !WarrantyType || A type of warranty offered by a company || Connection (n:1) || |
| 56 | || !WarrantyContract || A class which contains warranty information of (a collection of) hardware. || !WarrantyType (n:1) || |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
22 | | The web-interface can be opened in any regular web-browser. Ask your administrator for its address. Once you open the web-interface, a login-page should appear where you have to issue your credentials. |
23 | | |
24 | | From there you'll be able to add objects to the database, explore objects in the database, change objects in the database, or delete objects from the database. It's meant as a intuitive easy-to-use interface, with advanced Create-Read-Update-Delete (CRUD) functionalities. It makes you able to quickly explore the data stored in CMT, or act on the data. The most important entities you can act on are: |
| 64 | The web-interface can be opened in any regular web-browser. |
| 65 | Ask your administrator for its address. |
| 66 | Once you open the web-interface, a login-page should appear where you have to issue your credentials. |
| 67 | |
| 68 | From there you'll be able to add objects to the database, explore objects in the database, change objects in the database, or delete objects from the database. |
| 69 | It's meant as a intuitive easy-to-use interface, with advanced Create-Read-Update-Delete (CRUD) functionalities. |
| 70 | It makes you able to quickly explore the data stored in CMT, or act on the data. |
| 71 | The most important entities you can act on are: |
34 | | Network interfaces for input/output, thus any kind of card or (virtual) adapter which can have a network-cable plugged into it, and has a hardware address (like a MAC-address). Most obvious example is a regular 100/1000Mbit NIC, but it could be something like an InfiniBand interface card, or an out-of-band management adapter. Many network interfaces are related to a single piece of hardware, and a single network. |
| 85 | Network interfaces for input/output, thus any kind of card or (virtual) adapter which can have a network-cable plugged into it, and has a hardware address (like a MAC-address). |
| 86 | Most obvious example is a regular 100/1000Mbit NIC, but it could be something like an !InfiniBand interface card, or an out-of-band management adapter. |
| 87 | Many network interfaces are related to a single piece of hardware, and a single network. |