Revision 7806f19d

b/docs/collection_of_examples/server.rst
106 106
    Server 141 is not in DELETED mode
107 107
    [kamaki]:
108 108

  
109
Insect ssh keys to a debian server
109
Inject ssh keys to a debian server
110 110
----------------------------------
111 111

  
112 112
Assume that the servers build from the image `Debian Base Alpha` accept ssh
......
139 139

  
140 140
.. code-block:: console
141 141

  
142
    [kamaki]: 'NoPassword Server' 1 f1r57-1m4g3-1d -p /home/someuser/.ssh/id_rsa.pub,/root/.ssh/authorized_keys
142
    [kamaki]: server
143
    [server]: create 'NoPassword Server' 1 f1r57-1m4g3-1d -p /home/someuser/.ssh/id_rsa.pub,/root/.ssh/authorized_keys
143 144
    accessIPv4:      
144 145
    accessIPv6:      
145 146
    addresses:      
......
158 159
    metadata:       
159 160
                    os:    debian
160 161
                    users: root
161
    name:            My First Server
162
    name:           No Password Server
162 163
    progress:        0
163 164
    security_groups:
164 165
                    name: default
......
167 168
    tenant_id:       s0m3-u53r-1d
168 169
    updated:         2013-06-19T12:34:48.512867+00:00
169 170
    user_id:         s0m3-u53r-1d
170
    [kamaki]:
171
    [server]:
171 172

  
172 173
When the VM is ready, get the VMs external IP from the web UI. Let's assume the
173 174
IP is 123.456.78.90 .
174 175

  
175 176
.. code-block:: console
176 177

  
177
    [kamaki]: /exit
178
    [server]: /exit
178 179
    $ ssh 123.456.78.90
179
    Linux remote-vm-4241 2.6.32-5-amd64 #1 SMP Fri May 10 08:43:19 XXXX x86_64
180
    Linux remote-vm-4241 2.6.32-5-amd64 #1 SMP XXXX x86_64
180 181

  
181 182
    The programs included with the Debian GNU/Linux system are free software;
182 183
    the exact distribution terms for each program are described in the
......
186 187
    permitted by applicable law.
187 188
    root@remote-vm-4241:~# ls -l .ssh/
188 189
    total 4
189
    -rw-r--r-- 1 root root 399 Jun 19 15:46 authorized_keys
190
    -rw-r--r-- 1 root root 399 Jun 19 12:34 authorized_keys
190 191
    root@remote-vm-4241:~#
191 192

  
192 193
You can now log to your remote VM as root, without a password. Well done!
b/kamaki/cli/commands/pithos.py
135 135
        if newvalue is None:
136 136
            self._value = self.default
137 137
            return
138
        (start, end) = newvalue.split('-')
139
        (start, end) = (int(start), int(end))
140
        self._value = '%s-%s' % (start, end)
138
        start, sep, end = newvalue.partition('-')
139
        if sep:
140
            if start:
141
                self._value = '%s-%s' % (int(start), int(end))
142
            else:
143
                self._value = '-%s' % int(end)
144
        else:
145
            self._value = '%s' % int(start)
141 146

  
142 147

  
143 148
# Command specs
b/kamaki/clients/pithos/__init__.py
626 626
        return (blocksize, blockhash, total_size, hashmap['hashes'], map_dict)
627 627

  
628 628
    def _dump_blocks_sync(
629
            self, obj, remote_hashes, blocksize, total_size, dst, range,
629
            self, obj, remote_hashes, blocksize, total_size, dst, crange,
630 630
            **args):
631 631
        for blockid, blockhash in enumerate(remote_hashes):
632 632
            if blockhash:
633 633
                start = blocksize * blockid
634 634
                is_last = start + blocksize > total_size
635 635
                end = (total_size - 1) if is_last else (start + blocksize - 1)
636
                (start, end) = _range_up(start, end, range)
636
                (start, end) = _range_up(start, end, crange)
637 637
                args['data_range'] = 'bytes=%s-%s' % (start, end)
638 638
                r = self.object_get(obj, success=(200, 206), **args)
639 639
                self._cb_next()

Also available in: Unified diff