usd 0.2.5.3 → 0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/bin/rusdc +7 -6
- data/change_log.md +78 -0
- data/lib/usd.rb +70 -0
- data/usd.gemspec +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 01c14a85c19914e885ffd003e8b4584ab7f89a15305866abade4ea4888625940
|
4
|
+
data.tar.gz: e89f3b47d89b9040077400049e91aa0700f4c68d41b19c6cf7fde7a97f8e46c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5857ce4ebc1a8b24b59a1ce22e63cdaa9384724401d6aae189a3345c952ce74e22332b2a0a25ec3cf2bc3e3f059f298ca9455e391028f20675cd2069adeb4f3e
|
7
|
+
data.tar.gz: 97a5207333d77ece64e71b7883f8198bdd8fad5f47f772d72d6f438aaebb3e95ff6179bdbfd81d07574a033181a50642a2ede5f155aa6e62e1453e0170bc3770
|
data/README.md
CHANGED
@@ -23,7 +23,8 @@ yum install ruby-devel
|
|
23
23
|
|
24
24
|
# documentation
|
25
25
|
|
26
|
-
see [https://github.com/ogaida/usd/wiki](https://github.com/ogaida/usd/wiki)
|
26
|
+
- see [https://github.com/ogaida/usd/wiki](https://github.com/ogaida/usd/wiki)
|
27
|
+
- if you are looking for dependencies in between the objects, objectnames or relational objects, then have a look at [techdocs.broadcom.com](https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/business-management/ca-service-management/14-1/reference/ca-service-desk-manager-reference-commands/objects-and-attributes.html)
|
27
28
|
|
28
29
|
## bash-completion
|
29
30
|
|
data/bin/rusdc
CHANGED
@@ -250,11 +250,6 @@ class Rusdc < Thor
|
|
250
250
|
puts loadcon.create({:type => "json", :data => json})
|
251
251
|
end
|
252
252
|
|
253
|
-
# $ rusdc find lrel_oenv_orgref "nr.name like 'servername1'" org
|
254
|
-
# [{
|
255
|
-
# "org": "Orname1"
|
256
|
-
# }]
|
257
|
-
|
258
253
|
desc "nr_add_org <nr> <org>", "add an Organisation to a ConfigurationItem"
|
259
254
|
def nr_add_org(nr, org)
|
260
255
|
template = ERB.new <<-EOF
|
@@ -406,7 +401,13 @@ class Rusdc < Thor
|
|
406
401
|
:k => k,
|
407
402
|
:v => v
|
408
403
|
})
|
409
|
-
|
404
|
+
data = loadcon.update({:type => "json", :data => json})
|
405
|
+
if data.class == RestClient::BadRequest
|
406
|
+
puts "direkte Ausführung bekommt einen BadRequest, versuche Update über IDs. #{Usd::CN["cnt"]}"
|
407
|
+
#find(obj, wc="obj", fields="@COMMON_NAME")
|
408
|
+
else
|
409
|
+
puts data
|
410
|
+
end
|
410
411
|
end
|
411
412
|
|
412
413
|
desc "update_ref_attr_by_id <obj> <id> <key> <value_id>", "updates a referenced attribute of one object_id by value-id"
|
data/change_log.md
CHANGED
@@ -1,5 +1,83 @@
|
|
1
1
|
# rusdc changelog
|
2
2
|
|
3
|
+
## 0.3
|
4
|
+
|
5
|
+
- some common_name resolution
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
class Usd
|
9
|
+
CN={
|
10
|
+
"chg" => "chg_ref_num",
|
11
|
+
"cnt" => "combo_name",
|
12
|
+
"arcpur_rule" => "name",
|
13
|
+
"ca_tou" => "name",
|
14
|
+
"cost_cntr" => "name",
|
15
|
+
"country" => "name",
|
16
|
+
"dept" => "name",
|
17
|
+
"gl_code" => "name",
|
18
|
+
"job_func" => "name",
|
19
|
+
"loc" => "name",
|
20
|
+
"nr" => "name",
|
21
|
+
"opsys" => "name",
|
22
|
+
"org" => "name",
|
23
|
+
"tab" => "name",
|
24
|
+
"auto_close" => "sym",
|
25
|
+
"aty" => "sym",
|
26
|
+
"act_type_assoc" => "sym",
|
27
|
+
"ca_cmpny" => "sym",
|
28
|
+
"closure_code" => "sym",
|
29
|
+
"cmth" => "sym",
|
30
|
+
"symptom_code" => "sym",
|
31
|
+
"state" => "sym",
|
32
|
+
"crt" => "sym",
|
33
|
+
"ctab" => "sym",
|
34
|
+
"ctp" => "sym",
|
35
|
+
"dcon_typ" => "sym",
|
36
|
+
"dlgsrvr" => "sym",
|
37
|
+
"dmn" => "sym",
|
38
|
+
"doc_rep" => "sym",
|
39
|
+
"fmgrp" => "sym",
|
40
|
+
"ical_alarm" => "sym",
|
41
|
+
"ical_event_template" => "sym",
|
42
|
+
"imp" => "sym",
|
43
|
+
"intfc" => "sym",
|
44
|
+
"kwrd" => "sym",
|
45
|
+
"mfrmod" => "sym",
|
46
|
+
"mgsstat" => "sym",
|
47
|
+
"nrf" => "sym",
|
48
|
+
"options" => "sym",
|
49
|
+
"outage_type" => "sym",
|
50
|
+
"perscnt" => "sym",
|
51
|
+
"position" => "sym",
|
52
|
+
"pr_trans" => "sym",
|
53
|
+
"prod" => "sym",
|
54
|
+
"quick_tpl_types" => "sym",
|
55
|
+
"rc" => "sym",
|
56
|
+
"resocode" => "sym",
|
57
|
+
"resomethod" => "sym",
|
58
|
+
"response" => "sym",
|
59
|
+
"rrf" => "sym",
|
60
|
+
"rss" => "sym",
|
61
|
+
"seq" => "sym",
|
62
|
+
"sev" => "sym",
|
63
|
+
"site" => "sym",
|
64
|
+
"slatpl" => "sym",
|
65
|
+
"special_handling" => "sym",
|
66
|
+
"svc_contract" => "sym",
|
67
|
+
"typecnt" => "sym",
|
68
|
+
"tz" => "sym",
|
69
|
+
"tspan" => "sym",
|
70
|
+
"transition_type" => "sym",
|
71
|
+
"urg" => "sym",
|
72
|
+
"vpt" => "sym",
|
73
|
+
"wrkshft" => "sym",
|
74
|
+
"cr" => "ref_num",
|
75
|
+
"in" => "ref_num",
|
76
|
+
"pr" => "ref_num"
|
77
|
+
}
|
78
|
+
end
|
79
|
+
```
|
80
|
+
|
3
81
|
## 0.2.5.3
|
4
82
|
|
5
83
|
- neu function : `rusdc nr_add_org <nr> <org> # add an Organisation to a ConfigurationItem`
|
data/lib/usd.rb
CHANGED
@@ -10,6 +10,76 @@ require 'tempfile'
|
|
10
10
|
|
11
11
|
class Usd
|
12
12
|
|
13
|
+
CN={
|
14
|
+
"chg" => "chg_ref_num",
|
15
|
+
"cnt" => "combo_name",
|
16
|
+
"arcpur_rule" => "name",
|
17
|
+
"ca_tou" => "name",
|
18
|
+
"cost_cntr" => "name",
|
19
|
+
"country" => "name",
|
20
|
+
"dept" => "name",
|
21
|
+
"gl_code" => "name",
|
22
|
+
"job_func" => "name",
|
23
|
+
"loc" => "name",
|
24
|
+
"nr" => "name",
|
25
|
+
"opsys" => "name",
|
26
|
+
"org" => "name",
|
27
|
+
"tab" => "name",
|
28
|
+
"auto_close" => "sym",
|
29
|
+
"aty" => "sym",
|
30
|
+
"act_type_assoc" => "sym",
|
31
|
+
"ca_cmpny" => "sym",
|
32
|
+
"closure_code" => "sym",
|
33
|
+
"cmth" => "sym",
|
34
|
+
"symptom_code" => "sym",
|
35
|
+
"state" => "sym",
|
36
|
+
"crt" => "sym",
|
37
|
+
"ctab" => "sym",
|
38
|
+
"ctp" => "sym",
|
39
|
+
"dcon_typ" => "sym",
|
40
|
+
"dlgsrvr" => "sym",
|
41
|
+
"dmn" => "sym",
|
42
|
+
"doc_rep" => "sym",
|
43
|
+
"fmgrp" => "sym",
|
44
|
+
"ical_alarm" => "sym",
|
45
|
+
"ical_event_template" => "sym",
|
46
|
+
"imp" => "sym",
|
47
|
+
"intfc" => "sym",
|
48
|
+
"kwrd" => "sym",
|
49
|
+
"mfrmod" => "sym",
|
50
|
+
"mgsstat" => "sym",
|
51
|
+
"nrf" => "sym",
|
52
|
+
"options" => "sym",
|
53
|
+
"outage_type" => "sym",
|
54
|
+
"perscnt" => "sym",
|
55
|
+
"position" => "sym",
|
56
|
+
"pr_trans" => "sym",
|
57
|
+
"prod" => "sym",
|
58
|
+
"quick_tpl_types" => "sym",
|
59
|
+
"rc" => "sym",
|
60
|
+
"resocode" => "sym",
|
61
|
+
"resomethod" => "sym",
|
62
|
+
"response" => "sym",
|
63
|
+
"rrf" => "sym",
|
64
|
+
"rss" => "sym",
|
65
|
+
"seq" => "sym",
|
66
|
+
"sev" => "sym",
|
67
|
+
"site" => "sym",
|
68
|
+
"slatpl" => "sym",
|
69
|
+
"special_handling" => "sym",
|
70
|
+
"svc_contract" => "sym",
|
71
|
+
"typecnt" => "sym",
|
72
|
+
"tz" => "sym",
|
73
|
+
"tspan" => "sym",
|
74
|
+
"transition_type" => "sym",
|
75
|
+
"urg" => "sym",
|
76
|
+
"vpt" => "sym",
|
77
|
+
"wrkshft" => "sym",
|
78
|
+
"cr" => "ref_num",
|
79
|
+
"in" => "ref_num",
|
80
|
+
"pr" => "ref_num"
|
81
|
+
}
|
82
|
+
|
13
83
|
RestClient.proxy = ""
|
14
84
|
|
15
85
|
attr_reader :base_url, :user, :access_key, :expiration_date, :debug
|
data/usd.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'usd'
|
3
|
-
spec.version = '0.
|
4
|
-
spec.date = '2020-
|
3
|
+
spec.version = '0.3'
|
4
|
+
spec.date = '2020-08-31'
|
5
5
|
spec.summary = "SDM REST-API-Calls"
|
6
6
|
spec.description = "a Ruby class and a commandlinetool for SDM REST-API-Calls"
|
7
7
|
spec.authors = ["Oliver Gaida"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: usd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oliver Gaida
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|