Skip to content

Commit

Permalink
Merge af36a10 into d647027
Browse files Browse the repository at this point in the history
  • Loading branch information
vi4m committed Jul 9, 2014
2 parents d647027 + af36a10 commit 6eec343
Show file tree
Hide file tree
Showing 35 changed files with 564 additions and 321 deletions.
55 changes: 54 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,63 @@ Change Log
2.0.0-stable
~~~~~~~~~~~~

Released on June 20, 2014,
Released on July 1, 2014

This is a stable release.

* SCAN: Disk shares detection - disk shares without physical volume in OS are now detected, better merging of results.

* SCAN: ssh_proxmox changes - root user is now not required.

* SCAN: SNMP - AES priv protocol support.

* SCAN: SSH AIX - added normalization for wwns from aix plugin.

* SCAN: Scan postprocess is not disabled by default.

* SCAN: MAC addresses normalization.

* SCAN: [vmware plugin] subdevices w/o MAC addresses shouldn't be included in scan results.

* SCAN: Fixed 3par plugin #892 return results instead device_info.

* SCAN: Fixed ascii encoding problem in ssh_xen plugin.

* Feature/pricing api - shares - venture and virtual filters - pricing api: shares changed (back) to share mounts; added venture param and virtual mounts filter

* CMDB: New semantics - used uid instead of id for JIRA.

* CMDB: Inactive CI's are not displayed by default, use checkbox to include them optionally.

* CMDB: Changes importing are now handled by searching by creation date.

* DHCP: Fix protect against IP addresses with the same domain tests.

* CORE: Pluggable apps permissions and ralph_permission decorator. Improved permissions to pluggable apps; ralph_permission decorator could now be applied to dispatch method (before only to post/get/etc methods);

* CORE: Fixed sorting by network address/gateway in admin (incl. migration).
Network model gets new field gateway_as_int, which is used for sorting by "Gateway address" column ("Network address" column now uses min_ip field for this).

* CORE: Implemented 3 bound permissions per Ralph application (has_core_access, has_asset_access, has_scrooge_access).

* CORE: Disk shares in admin are now loading faster.

* CORE: Added getting device by ip address or remark to the pricing api.

* CORE: Fixed sorting by network address/gateway in admin (incl. migration).

* CORE: Pillow upgraded to 2.2.0.

* CORE: Added FC cards to the pricing API.

* CORE: Readonly widget has better appeareance.

* CORE: Added Docker installation method.

* DonPedro: Better FC and share mounts detection.

* DonPedro: Additional logging and mac addresses normalization.

2.0.0-rc8
~~~~~~~~~

Expand Down
6 changes: 2 additions & 4 deletions contrib/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ RUN apt-get install -y libcap2-bin
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y redis-server mysql-server libmysqlclient-dev libmysqld-dev
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-server apache2 supervisor
RUN apt-get install -y git
RUN /usr/bin/mysqld_safe & \
sleep 10s && \
echo "CREATE DATABASE ralph DEFAULT CHARACTER SET 'utf8'" | mysql && \
echo "GRANT ALL ON ralph.* TO ralph@'%' IDENTIFIED BY 'ralph'; FLUSH PRIVILEGES" | mysql
ADD init_mysql.sh /root/init_mysql.sh
RUN sh /root/init_mysql.sh
#RUN echo 'alter database ralph character set utf8 collate utf8_polish_ci' | mysql -u root
RUN pip install -U pip
RUN pip install -U flake8
Expand Down
10 changes: 10 additions & 0 deletions contrib/docker/init_mysql.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
mysql_install_db

mysqld_safe &
echo 'Waiting 10 secs for mysqld to come up'
sleep 10
echo "CREATE DATABASE ralph DEFAULT CHARACTER SET 'utf8'" | mysql && \
echo "GRANT ALL ON ralph.* TO ralph@'%' IDENTIFIED BY 'ralph'; FLUSH PRIVILEGES" | mysql
python createsuperuser.py
killall mysqld_safe
Binary file added doc/_static/custom_modules-module.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/_static/team_logo.png
Binary file not shown.
227 changes: 2 additions & 225 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ API

Various components of ralph suite expose a REST-ful API that can be used
both for querying the database and populating it with data. The API utilises
tastypie_ to handle your requests. ``json``, ``xml``, ``yaml``
tastypie_ to handle your requests. ``json``, ``xml``, ``yaml``
or ``plist`` format can be used for data serialization and deserialization.

.. _tastypie: http://django-tastypie.readthedocs.org/en/latest/
Expand Down Expand Up @@ -67,7 +67,7 @@ HTTP methods
-------------------------

The following methods can be used in the API. Consult the API reference of
specific module for more precise explanations.
specific module for more precise explanations.

+--------+----------------------------------+--------------------------------+
| Method | On a collection | On a single resource |
Expand Down Expand Up @@ -107,226 +107,3 @@ API references for modules:
:ref:`cmdb_resources`


Discovery available resources
-----------------------------

+-------------------------------------+--------------------------------------------------+
| Resource | Description |
+=====================================+==================================================+
| :ref:`devicewithpricing` | A collection of of devices with pricing |
+-------------------------------------+--------------------------------------------------+


.. _devicewithpricing:

DEVICEWITHPRICING
~~~~~~~~~~~~~~~~~

Example
^^^^^^^^^^^^^^^^^^

+---------+------------------------------------------------------------------------------+
| method | GET |
+---------+------------------------------------------------------------------------------+
| URL | http://localhost:8000/api/v0.9/devicewithpricing?limit=1 |
+---------+------------------------------------------------------------------------------+
| headers | Accept: application/json |
| | Authorization: ApiKey:your_api_key |
+---------+------------------------------------------------------------------------------+

Returned data::

{
"meta": {
"limit": 1,
"next": "/api/v0.9/devicewithpricing/?limit=1&offset=1",
"offset": 0,
"previous": null,
"total_count": 5408
},
"objects": [
{
"barcode": "123456789",
"boot_firmware": null,
"cache_version": 21,
"cached_cost": 666.73,
"cached_price": 170.0725,
"chassis_position": 123456789,
"components": [
{
"count": 4,
"model": "CPU Quad-Core Xeon 2533MHz, 4-core",
"price": 2824,
"serial": null
},
{
"count": 1,
"model": "[rack server] HP ProLiant DL360 G6",
"price": 6700,
"serial": "SN-2334GLBS"
},
{
"count": 12,
"model": "RAM 4096MiB",
"price": 228,
"serial": null
},
{
"count": 5,
"model": "HP EGSW23FAW SAS 307200MiB, 10000RPM",
"price": 0,
"serial": "SF#DGD32456354SD"
},
{
"count": 776,
"model": [
"software"
],
"price": 0,
"serial": null
},
{
"count": 4,
"model": "HP DG0353GE SAS 307200MiB, 10000RPM",
"price": 0,
"serial": "3536GRERGE45"
},
{
"count": 5,
"model": "Speed unknown",
"price": 0,
"serial": "45645HER343A"
}
],
"created": "2013-11-13T15:45:31",
"dc": "DataCenter1",
"deleted": false,
"deprecated": false,
"deprecation_date": "2012-12-01T00:00:00",
"diag_firmware": null,
"hard_firmware": null,
"id": 1,
"ip_addresses": [
{
"address": "127.0.0.1",
"cache_version": 10,
"created": "2012-10-05T10:12:00",
"device": "/api/v0.9/dev/23/",
"hostname": "server_prod1",
"http_family": "HP",
"id": 23,
"is_management": true,
"last_plugins": "",
"last_puppet": "2012-01-08T07:02:50",
"last_seen": "2012-01-08T07:02:50",
"modified": "2012-01-09T05:46:37",
"number": "1323234",
"resource_uri": "/api/v0.9/ipaddress/23/",
"snmp_community": null
}
],
"last_seen": "2012-01-08T07:02:49",
"management": {
"address": "127.0.0.1",
"cache_version": 10,
"created": "2012-10-05T10:12:00",
"device": "/api/v0.9/dev/24/",
"hostname": "mgmt_server1",
"http_family": "HP",
"id": 24,
"is_management": true,
"last_plugins": "",
"last_puppet": "2012-01-08T07:02:50",
"last_seen": "2012-01-08T07:02:50",
"modified": "2012-01-09T05:46:37",
"number": "24",
"resource_uri": "/api/v0.9/ipaddress/24/",
"snmp_community": null
},
"max_save_priority": 200,
"mgmt_firmware": "MALO 12 Advanced, Jul 16 2012,",
"model": {
"cache_version": 1,
"chassis_size": null,
"created": "2012-07-11T14:55:06",
"group": {
"cache_version": 0,
"created": "2012-09-24T15:19:58",
"id": 12,
"modified": "2012-09-24T15:19:58",
"name": "HP ProLiant DL360 G6",
"price": 9999,
"resource_uri": "/api/v0.9/modelgroup/12/",
"slots": 0,
"type": 201
},
"id": 3856220,
"modified": "2012-07-12T13:56:40",
"name": "HP ProLiant DL360 G6",
"resource_uri": "/api/v0.9/model/323/",
"type": 201
},
"modified": "2013-03-19T13:25:03",
"name": "prod_server1",
"name2": "test",
"position": "44",
"price": null,
"properties": [],
"purchase_date": "2009-12-01T00:00:00",
"rack": "Rack 666",
"remarks": "Test remarks",
"resource_uri": "/api/v0.9/devicewithpricing/1/",
"role": {
"cache_version": 123,
"created": "2012-06-19T13:02:31",
"id": 666,
"modified": "2012-10-15T14:28:50",
"name": "www",
"parent": null,
"path": "www",
"resource_uri": "/api/v0.9/role/666/",
"venture": "/api/v0.9/venture/12/"
},
"save_priorities": "hard_firmware=200 model_id=53 support_kind=200 margin_kind_id=200 verified=200 deleted=200 venture_id=200 chassis_position=200 barcode=200 diag_firmware=200 boot_firmware=200 remarks=200 position=200 support_expiration_date=200 venture_role_id=200 last_seen=53",
"sn": "26234672SHSD",
"splunk": {
"splunk_daily_cost": 0,
"splunk_monthly_cost": 0,
"splunk_size": 0
},
"support_expiration_date": null,
"support_kind": null,
"total_cost": 7859.073,
"uptime_seconds": 2348929,
"uptime_timestamp": "2011-01-08T07:02:50",
"venture": {
"cache_version": 999,
"created": "2012-10-12T17:13:09",
"department": {
"id": 1,
"name": "Infrastrukture",
"resource_uri": "/api/v0.9/department/1/"
},
"id": 65,
"is_infrastructure": true,
"modified": "2012-06-14T13:10:33",
"name": "Infrastrukture",
"path": "inf",
"resource_uri": "/api/v0.9/venture/65/",
"show_in_ralph": true,
"symbol": "inf"
},
"verified": false,
"warranty_expiration_date": null
}
]
}

- **Splunk cost**:

This resource contains a Splunk cost from last 31 days. If you want have other date range you must use additional parameters:

* ``splunk_start`` - define a start of date
* ``splunk_end`` - define a end of datet

``splunk_start`` and ``splunk_end`` value must be in format ``Y-m-d`` (example 2012-01-24)
23 changes: 0 additions & 23 deletions doc/browser.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,36 +50,13 @@ This tab shows everything that is related to network: the list of IP addresses
assigned to the device, the relevant DHCP and DNS configuration entries, and
the list of relevant :index:`loadbalancer` pools, together with their state.

:index:`Prices`
---------------

This tab is similar to the "components" tab, in that it displays the list of
components of the machine, but here all the components have their price
displayed. There is also all the relevant financial information such as the
deprecation period and the margin.


:index:`Costs`
--------------

This tab is a simplified version of the "prices" tab, but with less details.
It's for people who shouldn't see details of the pricing, but still want to
know how much the device costs. There is also a recent history of device's
costs.

:index:`History`
----------------

In this tab you can see the history of all changes to the device in the
database, together with dates, comments and people responsible for the change.
It's useful when you need to track what happened with the device in the past.

:index:`Purchase`
-----------------

This tab shows information relevant to the purchase of the device, such as
its purchase date, support kind and period, warranty, etc.

:index:`Discover`
-----------------

Expand Down
Loading

0 comments on commit 6eec343

Please sign in to comment.