MCPcopy Index your code
hub / github.com/saltstack/salt / version

Function version

salt/modules/oracle.py:171–199  ·  view source on GitHub ↗

Server Version (select banner from v$version) CLI Example: .. code-block:: bash salt '*' oracle.version salt '*' oracle.version my_db

(*dbs)

Source from the content-addressed store, hash-verified

169
170@depends("cx_Oracle", fallback_function=_cx_oracle_req)
171def version(*dbs):
172 """
173 Server Version (select banner from v$version)
174
175 CLI Example:
176
177 .. code-block:: bash
178
179 salt '*' oracle.version
180 salt '*' oracle.version my_db
181 """
182 pillar_dbs = __salt__["pillar.get"]("oracle:dbs")
183
184 def get_version(x):
185 return [
186 r[0] for r in run_query(x, "select banner from v$version order by banner")
187 ]
188
189 result = {}
190 if dbs:
191 log.debug("get db versions for: %s", dbs)
192 for db in dbs:
193 if db in pillar_dbs:
194 result[db] = get_version(db)
195 else:
196 log.debug("get all (%s) dbs versions", len(dbs))
197 for db in dbs:
198 result[db] = get_version(db)
199 return result
200
201
202@depends("cx_Oracle", fallback_function=_cx_oracle_req)

Callers

nothing calls this directly

Calls 2

debugMethod · 0.80
get_versionFunction · 0.70

Tested by

no test coverage detected