~cgb-cs/appscale/appscale-main

« back to all changes in this revision

Viewing changes to AppController/doc/Repo.html

  • Committer: Chris Bunch
  • Date: 2012-02-26 03:20:57 UTC
  • Revision ID: cgb@cs.ucsb.edu-20120226032057-ad0cy0zgx4we4exc
adding in repo over app engine support, and tests for most of datastore repo on appscale and s3

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
          
76
76
          <li><a href="#method-c-get_output">::get_output</a></li>
77
77
          
 
78
          <li><a href="#method-c-get_public_ip">::get_public_ip</a></li>
 
79
          
78
80
          <li><a href="#method-c-init">::init</a></li>
79
81
          
80
82
          <li><a href="#method-c-set_acl">::set_acl</a></li>
124
126
        
125
127
          <li><a href="./CronHelper.html">CronHelper</a></li>
126
128
        
 
129
          <li><a href="./Datastore.html">Datastore</a></li>
 
130
        
 
131
          <li><a href="./DatastoreFactory.html">DatastoreFactory</a></li>
 
132
        
 
133
          <li><a href="./DatastoreRepoOnAppScale.html">DatastoreRepoOnAppScale</a></li>
 
134
        
 
135
          <li><a href="./DatastoreS3.html">DatastoreS3</a></li>
 
136
        
127
137
          <li><a href="./Djinn.html">Djinn</a></li>
128
138
        
129
139
          <li><a href="./DjinnJobData.html">DjinnJobData</a></li>
237
247
          <div class="method-source-code"
238
248
            id="does_file_exist-3F-source">
239
249
<pre>
240
 
<span class="ruby-comment"># File lib/repo.rb, line 143</span>
 
250
<span class="ruby-comment"># File lib/repo.rb, line 149</span>
241
251
def self.does_file_exist?(path, storage=<span class="ruby-string">&quot;appdb&quot;</span>, creds={})
242
252
  if storage == <span class="ruby-string">&quot;appdb&quot;</span>
243
253
    result = `curl http://#{@@ip}:8079/doesexist -X POST -d 'SECRET=#{@@secret}' -d 'KEY=#{path}'`
297
307
          <div class="method-source-code"
298
308
            id="get_acl-source">
299
309
<pre>
300
 
<span class="ruby-comment"># File lib/repo.rb, line 137</span>
 
310
<span class="ruby-comment"># File lib/repo.rb, line 143</span>
301
311
def self.get_acl(path, storage=<span class="ruby-string">&quot;appdb&quot;</span>, creds={})
302
312
  return self.get(path, :acl, storage, creds)
303
313
end</pre>
332
342
          <div class="method-source-code"
333
343
            id="get_output-source">
334
344
<pre>
335
 
<span class="ruby-comment"># File lib/repo.rb, line 125</span>
 
345
<span class="ruby-comment"># File lib/repo.rb, line 131</span>
336
346
def self.get_output(path, storage=<span class="ruby-string">&quot;appdb&quot;</span>, creds={}, is_file=false)
337
347
  return self.get(path, :output, storage, creds, is_file)
338
348
end</pre>
346
356
      </div>
347
357
 
348
358
    
 
359
      <div id="get_public_ip-method" class="method-detail ">
 
360
        <a name="method-c-get_public_ip"></a>
 
361
 
 
362
        
 
363
        <div class="method-heading">
 
364
          <span class="method-name">get_public_ip</span><span
 
365
            class="method-args">()</span>
 
366
          <span class="method-click-advice">click to toggle source</span>
 
367
        </div>
 
368
        
 
369
 
 
370
        <div class="method-description">
 
371
          
 
372
          <p>So since we can’t expose reading class variables directly, this method
 
373
exposes just what we need - where the <a href="Repo.html">Repo</a> app is
 
374
hosted.</p>
 
375
          
 
376
 
 
377
          
 
378
          <div class="method-source-code"
 
379
            id="get_public_ip-source">
 
380
<pre>
 
381
<span class="ruby-comment"># File lib/repo.rb, line 34</span>
 
382
def self.get_public_ip()
 
383
  return @@ip
 
384
end</pre>
 
385
          </div>
 
386
          
 
387
        </div>
 
388
 
 
389
        
 
390
 
 
391
        
 
392
      </div>
 
393
 
 
394
    
349
395
      <div id="init-method" class="method-detail ">
350
396
        <a name="method-c-init"></a>
351
397
 
402
448
          <div class="method-source-code"
403
449
            id="set_acl-source">
404
450
<pre>
405
 
<span class="ruby-comment"># File lib/repo.rb, line 131</span>
 
451
<span class="ruby-comment"># File lib/repo.rb, line 137</span>
406
452
def self.set_acl(path, new_acl, storage=<span class="ruby-string">&quot;appdb&quot;</span>, creds={})
407
453
  return self.set(path, new_acl, :acl, storage, creds)
408
454
end</pre>
437
483
          <div class="method-source-code"
438
484
            id="set_output-source">
439
485
<pre>
440
 
<span class="ruby-comment"># File lib/repo.rb, line 118</span>
 
486
<span class="ruby-comment"># File lib/repo.rb, line 124</span>
441
487
def self.set_output(path, output, storage=<span class="ruby-string">&quot;appdb&quot;</span>, creds={}, is_file=false)
442
488
  return self.set(path, output, :output, storage, creds, is_file)
443
489
end</pre>
476
522
          <div class="method-source-code"
477
523
            id="start-source">
478
524
<pre>
479
 
<span class="ruby-comment"># File lib/repo.rb, line 38</span>
 
525
<span class="ruby-comment"># File lib/repo.rb, line 44</span>
480
526
def self.start(login_ip, uaserver_ip)
481
527
  <span class="ruby-comment"># its just another app engine app - but since numbering starts</span>
482
528
  <span class="ruby-comment"># at zero, this app has to be app neg one</span>
551
597
          <div class="method-source-code"
552
598
            id="stop-source">
553
599
<pre>
554
 
<span class="ruby-comment"># File lib/repo.rb, line 85</span>
 
600
<span class="ruby-comment"># File lib/repo.rb, line 91</span>
555
601
def self.stop
556
602
  <span class="ruby-constant">Djinn</span>.log_debug(`pkill -f dev_appserver`)
557
603
  <span class="ruby-constant">Djinn</span>.log_debug(`pkill -f DevAppServerMain`)
591
637
          <div class="method-source-code"
592
638
            id="valid_storage_creds-source">
593
639
<pre>
594
 
<span class="ruby-comment"># File lib/repo.rb, line 98</span>
 
640
<span class="ruby-comment"># File lib/repo.rb, line 104</span>
595
641
def self.valid_storage_creds(storage, creds)
596
642
  if storage == <span class="ruby-string">&quot;appdb&quot;</span>
597
643
    valid = true