Merge pull request #6 from Mirantis/doc-update

Doc update
This commit is contained in:
Łukasz Oleś 2015-07-06 13:22:46 +02:00
commit 6f74f2070b
2 changed files with 15 additions and 0 deletions

View File

@ -32,8 +32,22 @@ cd /vagrant
solar resource create node1 resources/ro_node/ '{"ip":"10.0.0.3", "ssh_key" : "/vagrant/.vagrant/machines/solar-dev1/virtualbox/private_key", "ssh_user":"vagrant"}'
solar resource create mariadb_service resources/mariadb_service '{"image": "mariadb", "root_password": "mariadb", "port": 3306}'
solar resource create keystone_db resources/mariadb_keystone_db/ '{"db_name": "keystone_db", "login_user": "root"}'
solar resource create keystone_db_user resources/mariadb_user/ '{"user_name": "keystone", "user_password": "keystone", "login_user": "root"}'
solar connect node1 mariadb_service
solar connect node1 keystone_db
solar connect mariadb_service keystone_db --mapping '{"root_password": "login_password", "port": "login_port"}'
solar connect mariadb_service keystone_db_user --mapping '{"root_password": "login_password", "port": "login_port"}'
solar connect keystone_db keystone_db_user
solar changes stage
solar changes commit
```
You can fiddle with the above configuration like this:
```
solar resource update keystone_db_user '{"user_password": "new_keystone_password"}'
solar changes stage
solar changes commit

View File

@ -342,6 +342,7 @@ def init_cli_resource():
@click.argument('args')
def update(name, args):
args = json.loads(args)
click.echo('Updating resource {} with args {}'.format(name, args))
all = sresource.load_all()
r = all[name]
r.update(args)