content
stringlengths
7
1.05M
""" ---> Minimum Insertions to Balance a Parentheses String ---> Medium """ class Solution: def minInsertions(self, s: str) -> int: open_brackets = 0 insertions_needed = 0 i = 0 while i < len(s): if s[i] == '(': open_brackets += 1 else: if i == len(s) - 1: insertions_needed += 1 elif s[i + 1] != ')': insertions_needed += 1 else: i += 1 if open_brackets: open_brackets -= 1 else: insertions_needed += 1 i += 1 insertions_needed += 2 * open_brackets return insertions_needed in_s = "))())(" a = Solution() print(a.minInsertions(in_s)) """ Keep track of number of (, if you get a ) then check if their are more elements after it, if not then ans + 1 else check if the next bracket is ) then decrease a ( else ans + 1 At last add 2 * remaining open brackets to ans """
string1 = "Scout Finch" string2 = "Harry Potter" # Concatenation can be used to join multiple strings into one larger string print(string1 + string2) # We cannot subtract strings as it will give error and not work # We can mutiply strings, but cannot divide strings print(string1 * 3) # Important String Commands # len() returns the length of the string # Note: Counts everything between quotes including punctuation and spaces print(len(string2)) print(len("!%^&**()@::||\/")) # Case Conversion # To convert to all uppercase, we use upper() # To convert to lowercase, we use lower() upperCase = string1.upper() print(upperCase) print(string2.lower()) # Finding and Replacing Characters in a String (Case Sensitive) # Find command finds position of first matching letter or sequence location = string1.find("c") print(location) # Note: When talking about position or location we start counting at 0 # Note: This means that the last position of a string is in the length -1 # We can also use Find to locate a whole string location = string2.find("Pot") print(location) # What happens if Find doesn't find a match? print(string1.find("z")) # A result of -1 means the search value was not found # Replace Command takes two inputs: What to replace and what to replace it with # Also Case Sensitive newString1 = string1.replace("Fi", "Be") print(newString1) # Replace will replace every thing that matches print(string2.replace("r", "b")) # Comparing Strings # Sometimes we would like to be able to compare two strings # Checking for = or ≠ is the same as checking numbers word1 = "Pineapple" word2 = "Banana" word3 = "banana" if word1 == word2: print("That's weird.") if word1 != word2: print("Makes sense.") # Comparisons of strings are Case Sensitive if word2 == word3: print("???") # We can also compare strings to see if one is greater than or less than another if word1 > word2: print(word1, "is greater.") # Order of strings is determined by placement alphabetically # Letters that come first alphabetically are less than those that come later if word2 > word3: print(word2, "is greater.") if word2 < word3: print(word3, "is greater.") # Lowercases are considered greater than uppercase letter due to their positioning on the ASCII Character Table if "cat" > "cab": print("Yep.") if "cat" < "cab": print("Nope.") # Indexing is a way to access a single letter. We can do this for bother strings and lists, although far more common with lists letter = string1[0] print(letter) # This takes the first letter of string1 # To help remember what this does, it is recommended reading the [] as "at postion" # string1 [4] says "string1 at position 4" # How would I print just the last letter of string2? Assume we can't see string2 to count it out. print(string2[len(string2 - 1)]) # Positions start at 0, and the last position is length - 1 # The value inside the [] must be an integer
######## # Copyright (c) 2020 Cloudify Platform Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # * See the License for the specific language governing permissions and # * limitations under the License. DEPENDENCY_CREATOR = 'dependency_creator' SOURCE_DEPLOYMENT = 'source_deployment' TARGET_DEPLOYMENT = 'target_deployment' TARGET_DEPLOYMENT_FUNC = 'target_deployment_func' EXTERNAL_SOURCE = 'external_source' EXTERNAL_TARGET = 'external_target' def create_deployment_dependency(dependency_creator, source_deployment=None, target_deployment=None, target_deployment_func=None, external_source=None, external_target=None): dependency = { DEPENDENCY_CREATOR: dependency_creator, } if source_deployment: dependency[SOURCE_DEPLOYMENT] = source_deployment if target_deployment: dependency[TARGET_DEPLOYMENT] = target_deployment if target_deployment_func: dependency[TARGET_DEPLOYMENT_FUNC] = target_deployment_func if external_source: dependency[EXTERNAL_SOURCE] = external_source if external_target: dependency[EXTERNAL_TARGET] = external_target return dependency def dependency_creator_generator(connection_type, to_deployment): return '{0}.{1}'.format(connection_type, to_deployment)
class IRCUser(object): def __init__(self, nick, ident, host, voice=False, op=False): self.nick = nick self.ident = ident self.host = host self.set_hostmask() self.is_voice = voice self.is_op = op def set_hostmask(self): self.hostmask = "%s@%s" % (self.ident, self.host) @staticmethod def from_userinfo(userinfo): nick = "" ident = "" host = "" parts = userinfo.split("!", 2) nick = parts[0].lstrip(":") if len(parts) > 1: parts = parts[1].split("@", 2) ident = parts[0] if len(parts) > 1: host = parts[1] return IRCUser(nick, ident, host) def to_userinfo(self): return "%s!%s@%s" % (self.nick, self.ident, self.host) def __str__(self): flags = "" if self.is_voice: flags += "v" if self.is_op: flags += "o" return "IRCUser: {{nick: \"{nick}\", ident: \"{ident}\", host: \"{host}\", flags: \"{flags}\"}}".format( nick=self.nick, ident=self.ident, host=self.host, flags=flags )
## https://beginnersbook.com/2018/01/python-program-check-leap-year-or-not/ def is_leap_year(year): year = int(year); # Leap Year Check if year % 4 == 0 and year % 100 != 0: return True; elif year % 100 == 0: print(year, "is not a Leap Year") return False; elif year % 400 ==0: return True; else: return False;
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ########################################### # (c) 2016-2020 Polyvios Pratikakis # [email protected] ########################################### #__all__ = ['utils'] ''' empty '''
class Solution: def prisonAfterNDays(self, cells: List[int], N: int) -> List[int]: def nextDay(cells): mask = cells.copy() for i in range(1, len(cells) - 1): if mask[i-1] ^ mask[i+1] == 0: cells[i] = 1 else: cells[i] = 0 cells[0] = 0 cells[-1] = 0 return cells day1 = tuple(nextDay(cells)) N -= 1 count = 0 while N > 0: day = tuple(nextDay(cells)) N -= 1 count += 1 if day == day1: N = N % count return cells
class Subject(object): def regist(self, observer): pass def unregist(self, observer): pass def notify(self): pass class Observer(object): def update(self): pass class MoniterObserver(Observer): def __init__(self, name): self.name = name def update(self, data): print("{} get data {}".format(self.name, data)) class CommandObserver(Observer): def __init__(self, name): self.name = name def update(self, data): print("{} get data {}".format(self.name, data)) class SubjectA(Subject): def __init__(self): self.observers = [] self.data = 5 def changeData(self, data): self.data = data def regist(self, observer): self.observers.append(observer) def unregist(self, observer): self.observers.remove(observer) def notify(self): for observer in self.observers: observer.update(self.data) if __name__ == "__main__": s = SubjectA() m = MoniterObserver("moniter") c = CommandObserver("command") s.regist(m) s.regist(c) s.notify() s.changeData(10) s.notify()
""" Dirty script to help generate go_ast code from an actual Go AST. Paste go code into https://lu4p.github.io/astextract/ and then the AST here. """ AST = r""" &ast.CallExpr { Fun: &ast.FuncLit { Type: &ast.FuncType { Params: &ast.FieldList { List: []*ast.Field { &ast.Field { Names: []*ast.Ident { &ast.Ident { Name: "repeated", }, }, Type: &ast.ArrayType { Elt: &ast.Ident { Name: "int", }, }, }, &ast.Field { Names: []*ast.Ident { &ast.Ident { Name: "n", }, }, Type: &ast.Ident { Name: "int", }, }, }, }, Results: &ast.FieldList { List: []*ast.Field { &ast.Field { Names: []*ast.Ident { &ast.Ident { Name: "result", }, }, Type: &ast.ArrayType { Elt: &ast.Ident { Name: "int", }, }, }, }, }, }, Body: &ast.BlockStmt { List: []ast.Stmt { &ast.ForStmt { Init: &ast.AssignStmt { Lhs: []ast.Expr { &ast.Ident { Name: "i", }, }, Tok: token.DEFINE, Rhs: []ast.Expr { &ast.BasicLit { Kind: token.INT, Value: "0", }, }, }, Cond: &ast.BinaryExpr { X: &ast.Ident { Name: "i", }, Op: token.LSS, Y: &ast.Ident { Name: "n", }, }, Post: &ast.IncDecStmt { X: &ast.Ident { Name: "i", }, Tok: token.INC, }, Body: &ast.BlockStmt { List: []ast.Stmt { &ast.AssignStmt { Lhs: []ast.Expr { &ast.Ident { Name: "result", }, }, Tok: token.ASSIGN, Rhs: []ast.Expr { &ast.CallExpr { Fun: &ast.Ident { Name: "append", }, Args: []ast.Expr { &ast.Ident { Name: "result", }, &ast.Ident { Name: "repeated", }, }, Ellipsis: 109, }, }, }, }, }, }, &ast.ReturnStmt { Results: []ast.Expr { &ast.Ident { Name: "result", }, }, }, }, }, }, Args: []ast.Expr { &ast.Ident { Name: "elts", }, &ast.Ident { Name: "number", }, }, } """ def go_ast_to_py(tree: str) -> str: result = "" list_closing_levels = [] for line in tree.splitlines(keepends=True): level = len(line) - len(line.lstrip()) before_quote, *after_quote = line.split('"') for a, b in { "&": "", ' {': '(', '}': ')', ': ': '=', }.items(): before_quote = before_quote.replace(a, b) if not after_quote: before_quote, *after_list = before_quote.split("[]") if after_list: before_quote += '[' + '\n' list_closing_levels.append(level) elif level in list_closing_levels: before_quote = before_quote.replace(')', ']') list_closing_levels.remove(level) result += '"'.join([before_quote] + after_quote) return result if __name__ == '__main__': print(go_ast_to_py(AST))
class Token: SP_S = '(' # 文字列集合_開始 SP_E = ')' # 文字列集合_終了 AND = '&' # 文字列集合_論理積 OR = '|' # 文字列集合_論理和 INVT = '!' # 文字列集合_否定 REPT = '+' # 文字列集合_1文字以上の繰返し CH_S = '[' # 文字集合_開始 CH_E = ']' # 文字集合_終了 WHOL = '.' # 文字集合_全集合 DENY = '^' # 文字集合_補集合 ESC = '\\' # エスケープ
""" AERoot module """ __version__ = "0.3.2"
class CQueue: ''' Custom-made circular queue, which is fixed sized. The motivation here is to have * O(1) complexity for peeking the center part of the data In contrast, deque has O(n) complexity * O(1) complexity to sample from the queue (e.g., sampling replays) ''' def __init__(self, n): ''' Preallocate n slots for circular queue ''' self.n = n self.q = [None] * n # Data always pushed to the tail and popped from the head. # Head points to the next location to pop. # Tail points to the next location to push. # if head == tail, then #size = 0 self.head = 0 self.tail = 0 self.sz = 0 def _inc(self, v): v += 1 if v >= self.n: v = 0 return v def _dec(self, v): v -= 1 if v < 0: v = self.n - 1 return v def _proj(self, v): while v >= self.n: v -= self.n while v < 0: v += self.n return v def push(self, m): if self.sz == self.n: return False self.sz += 1 self.q[self.tail] = m self.tail = self._inc(self.tail) return True def pop(self): if self.sz == 0: return self.sz -= 1 m = self.q[self.head] self.head = self._inc(self.head) return m def popn(self, T): if self.sz < T: return self.sz -= T self.head = self._proj(self.head + T) return True def peekn_top(self, T): if self.sz < T: return return list(self.interval_pop(T)) def peek_pop(self, start=0): if start >= self.sz: return i = self._proj(self.head + start) return self.q[i] def interval_pop(self, region_len, start=0): ''' Return an iterator with region_len The interval is self.head + [start, start+region_len) ''' if self.sz < region_len - start: raise IndexError i = self._proj(self.head + start) for j in range(region_len): yield self.q[i] i = self._inc(i) def interval_pop_rev(self, region_len, end=-1): ''' Return a reverse iterator with region_len The interval is self.head + [end + region_len, end) (in reverse order) ''' if self.sz < end + region_len: raise IndexError i = self._proj(self.head + end + region_len) for j in range(region_len): yield self.q[i] i = self._dec(i) def sample(self, T=1): ''' Sample from the queue for off-policy methods We want to sample T consecutive samples. ''' start = random.randint(0, self.sz - T) # Return an iterator return self.interval_pop(T, start=start) def __len__(self): return self.sz
load("@bazel_skylib//lib:collections.bzl", "collections") load("@bazel_skylib//lib:paths.bzl", "paths") load("@bazel_skylib//lib:shell.bzl", "shell") load("//fs_image/bzl/image_actions:feature.bzl", "image_feature") load("//fs_image/bzl/image_actions:install.bzl", "image_install") load("//fs_image/bzl/image_actions:mkdir.bzl", "image_mkdir") load("//fs_image/bzl/image_actions:remove.bzl", "image_remove") load("//fs_image/bzl/image_actions:symlink.bzl", "image_symlink_dir") load(":maybe_export_file.bzl", "maybe_export_file") load(":oss_shim.bzl", "buck_genrule", "get_visibility") load(":target_tagger.bzl", "mangle_target", "maybe_wrap_executable_target") # KEEP IN SYNC with its copy in `rpm/find_snapshot.py` RPM_SNAPSHOT_BASE_DIR = "__fs_image__/rpm/repo-snapshot" # KEEP IN SYNC with its copy in `rpm/find_snapshot.py` def snapshot_install_dir(snapshot): return paths.join("/", RPM_SNAPSHOT_BASE_DIR, mangle_target(snapshot)) def yum_or_dnf_wrapper(name): if name not in ("yum", "dnf"): fail("Must be `yum` or `dnf`", "yum_or_dnf") buck_genrule( name = name, out = "ignored", bash = 'echo {} > "$OUT" && chmod u+rx "$OUT"'.format(shell.quote( """\ #!/bin/sh set -ue -o pipefail -o noclobber my_path=\\$(readlink -f "$0") my_dir=\\$(dirname "$my_path") installer_dir=\\$(dirname "$my_dir") base_dir=\\$(dirname "$installer_dir") exec "$base_dir"/yum-dnf-from-snapshot \\ --snapshot-dir "$base_dir" \\ {yum_or_dnf} -- "$@" """.format(yum_or_dnf = shell.quote(name)), )), visibility = ["PUBLIC"], ) def rpm_repo_snapshot( name, src, storage, rpm_installers, repo_server_ports = (28889, 28890), visibility = None): ''' Takes a bare in-repo snapshot, enriches it with `storage.sql3` from storage, and injects some auxiliary binaries & data. This prepares the snapshot for installation into a build appliance (or `image_foreign_layer`) via `install_rpm_repo_snapshot`. - `storage`: JSON config for an `fs_image.rpm.storage` class. Hack alert: If you pass `storage["kind"] == "filesystem"`, and its `"base_dir"` is relative, it will magically be interpreted to be relative to the snapshot dir, both by this code, and later by `yum-dnf-from-snapshot` that runs in the build appliance. - `rpm_installers`: A tuple of 'yum', or 'dnf', or both. The snapshotted repos might be compatible with (or tested with) only one package manager but not with the other. - `repo_server_ports`: Hardcodes into the snapshot some localhost ports, on which the RPM repo snapshots will be served. Hardcoding is required because the server URI is part of the cache key for `dnf`. Moreover, hardcoded ports make container setup easier. The main impact of this port list is that its **size** determines the maximum number of repo objects (e.g. RPMs) that `yum` / `dnf` can concurrently fetch at installation time. The defaults were picked at random from [16384, 32768) to avoid the default ephemeral port range of 32768+, and to avoid lower port #s which tend to be reserved for services. We should not have issues with port collisions, because nothing else should be running in the container when we install RPMs. If you do have a collision (e.g. due to installing multiple snapshots), they are easy enough to change. Future: If collisions due to multi-snapshot installations are commonplace, we could generate the ports via a deterministic hash of the normalized target name (akin to `mangle_target`), so that they wouldn't avoid collision by default. ''' if not rpm_installers or not all([ # CAREFUL: Below we assume that installer names need no shell-quoting. (p in ["yum", "dnf"]) for p in rpm_installers ]): fail( 'Must contain >= 1 of "yum" / "dnf", got {}'.format(rpm_installers), "rpm_installers", ) # For tests, we want relative `base_dir` to point into the snapshot dir. cli_storage = storage.copy() if cli_storage["kind"] == "filesystem" and \ not cli_storage["base_dir"].startswith("/"): cli_storage["base_dir"] = "$(location {})/{}".format( src, cli_storage["base_dir"], ) # We need a wrapper to `cp` a `buck run`nable target in @mode/dev. _, yum_dnf_from_snapshot_wrapper = maybe_wrap_executable_target( target = "//fs_image/rpm:yum-dnf-from-snapshot", wrap_prefix = "__rpm_repo_snapshot", visibility = [], ) # Future: remove this in favor of linking it with `inject_repo_servers.py`. # See the comment in that file for more info. _, repo_server_wrapper = maybe_wrap_executable_target( target = "//fs_image/rpm:repo-server", wrap_prefix = "__rpm_repo_snapshot", visibility = [], ) quoted_repo_server_ports = shell.quote( " ".join([ str(p) for p in sorted(collections.uniq(repo_server_ports)) ]), ) # For each RPM installer supported by the snapshot, install: # - A rewritten config that is ready to serve the snapshot (assuming # that its repo-servers are started). `yum-dnf-from-snapshot` knows # to search the location we set in `--install-dir`. # - A transparent wrapper that runs the RPM installer with extra # sandboxing, and using our rewritten config. Each binary goes in # `bin` subdir, making it easy to add any one binary to `PATH`. per_installer_cmds = [] for rpm_installer in rpm_installers: per_installer_cmds.append(''' mkdir -p "$OUT"/{prog}/bin cp $(location //fs_image/bzl:{prog}) "$OUT"/{prog}/bin/{prog} $(exe //fs_image/rpm:write-yum-dnf-conf) \\ --rpm-installer {prog} \\ --input-conf "$OUT"/snapshot/{prog}.conf \\ --output-dir "$OUT"/{prog}/etc \\ --install-dir {quoted_install_dir}/{prog}/etc \\ --repo-server-ports {quoted_repo_server_ports} \\ '''.format( prog = rpm_installer, quoted_install_dir = shell.quote(snapshot_install_dir(":" + name)), quoted_repo_server_ports = quoted_repo_server_ports, )) buck_genrule( name = name, out = "ignored", bash = '''\ set -ue -o pipefail -o noclobber # Make sure FB CI considers RPM snapshots changed if this bzl (or its # dependencies) change. echo $(location //fs_image/bzl:rpm_repo_snapshot) > /dev/null mkdir "$OUT" # Copy the basic snapshot, e.g. `snapshot.storage_id`, `repos`, `yum|dnf.conf` cp --no-target-directory -r $(location {src}) "$OUT/snapshot" $(exe //fs_image/rpm/storage:cli) --storage {quoted_cli_storage_cfg} \\ get "\\$(cat "$OUT"/snapshot/snapshot.storage_id)" \\ > "$OUT"/snapshot/snapshot.sql3 # Write-protect the SQLite DB because it's common to use the `sqlite3` to # inspect it, and it's otherwise very easy to accidentally mutate the build # artifact, which is a big no-no. chmod a-w "$OUT"/snapshot/snapshot.sql3 cp $(location {yum_dnf_from_snapshot_wrapper}) "$OUT"/yum-dnf-from-snapshot cp $(location {repo_server_wrapper}) "$OUT"/repo-server # It's possible but harder to parse these from a rewritten `yum|dnf.conf`. echo {quoted_repo_server_ports} > "$OUT"/ports-for-repo-server # Tells `repo-server`s how to connect to the snapshot storage. echo {quoted_storage_cfg} > "$OUT"/snapshot/storage.json {per_installer_cmds} '''.format( src = maybe_export_file(src), quoted_cli_storage_cfg = shell.quote(struct(**cli_storage).to_json()), yum_dnf_from_snapshot_wrapper = yum_dnf_from_snapshot_wrapper, repo_server_wrapper = repo_server_wrapper, quoted_repo_server_ports = quoted_repo_server_ports, quoted_storage_cfg = shell.quote(struct(**storage).to_json()), per_installer_cmds = "\n".join(per_installer_cmds), ), # This rule is not cacheable due to `maybe_wrap_executable_target` # above. Technically, we could make it cacheable in @mode/opt, but # since this is essentially a cache-retrieval rule already, that # doesn't seem useful. For the same reason, nor does it seem that # useful to move the binary installation as `install_buck_runnable` # into `install_rpm_repo_snapshot`. cacheable = False, visibility = get_visibility(visibility, name), ) # Future: Once we have `ensure_dir_exists`, this can be implicit. def set_up_rpm_repo_snapshots(): return image_feature(features = [ image_mkdir("/", RPM_SNAPSHOT_BASE_DIR), image_mkdir("/__fs_image__/rpm", "default-snapshot-for-installer"), ]) def install_rpm_repo_snapshot(snapshot): """ Returns an `image.feature`, which installs the `rpm_repo_snapshot` target in `snapshot` in its canonical location. The layer must also include `set_up_rpm_repo_snapshots()`. """ dest_dir = snapshot_install_dir(snapshot) features = [image_install(snapshot, dest_dir)] return image_feature(features = features) def default_rpm_repo_snapshot_for(prog, snapshot): """ Set the default snapshot for the given RPM installer. The snapshot must have been installed by `install_rpm_repo_snapshot()`. """ # Keep in sync with `rpm_action.py` and `set_up_rpm_repo_snapshots()` link_name = "__fs_image__/rpm/default-snapshot-for-installer/" + prog return image_feature(features = [ # Silently replace the parent's default because there's not an # obvious scenario in which this is an error, and so forcing the # user to pass an explicit `replace_existing` flag seems unhelpful. image_remove(link_name, must_exist = False), image_symlink_dir(snapshot_install_dir(snapshot), link_name), ])
# This file is created by generate_build_files.py. Do not edit manually. test_support_sources = [ "src/crypto/test/file_test.cc", "src/crypto/test/test_util.cc", ] def create_tests(copts): test_support_sources_complete = test_support_sources + \ native.glob(["src/crypto/test/*.h"]) native.cc_test( name = "aes_test", size = "small", srcs = ["src/crypto/aes/aes_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "base64_test", size = "small", srcs = ["src/crypto/base64/base64_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "bio_test", size = "small", srcs = ["src/crypto/bio/bio_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "bn_test", size = "small", srcs = ["src/crypto/bn/bn_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "bytestring_test", size = "small", srcs = ["src/crypto/bytestring/bytestring_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_128_gcm", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-128-gcm", "$(location src/crypto/cipher/test/aes_128_gcm_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_128_gcm_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_128_key_wrap", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-128-key-wrap", "$(location src/crypto/cipher/test/aes_128_key_wrap_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_128_key_wrap_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_256_gcm", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-256-gcm", "$(location src/crypto/cipher/test/aes_256_gcm_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_256_gcm_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_256_key_wrap", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-256-key-wrap", "$(location src/crypto/cipher/test/aes_256_key_wrap_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_256_key_wrap_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_chacha20_poly1305", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "chacha20-poly1305", "$(location src/crypto/cipher/test/chacha20_poly1305_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/chacha20_poly1305_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_chacha20_poly1305_old", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "chacha20-poly1305-old", "$(location src/crypto/cipher/test/chacha20_poly1305_old_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/chacha20_poly1305_old_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_rc4_md5_tls", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "rc4-md5-tls", "$(location src/crypto/cipher/test/rc4_md5_tls_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/rc4_md5_tls_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_rc4_sha1_tls", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "rc4-sha1-tls", "$(location src/crypto/cipher/test/rc4_sha1_tls_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/rc4_sha1_tls_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_128_cbc_sha1_tls", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-128-cbc-sha1-tls", "$(location src/crypto/cipher/test/aes_128_cbc_sha1_tls_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_128_cbc_sha1_tls_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_128_cbc_sha1_tls_implicit_iv", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-128-cbc-sha1-tls-implicit-iv", "$(location src/crypto/cipher/test/aes_128_cbc_sha1_tls_implicit_iv_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_128_cbc_sha1_tls_implicit_iv_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_128_cbc_sha256_tls", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-128-cbc-sha256-tls", "$(location src/crypto/cipher/test/aes_128_cbc_sha256_tls_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_128_cbc_sha256_tls_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_256_cbc_sha1_tls", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-256-cbc-sha1-tls", "$(location src/crypto/cipher/test/aes_256_cbc_sha1_tls_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_256_cbc_sha1_tls_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_256_cbc_sha1_tls_implicit_iv", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-256-cbc-sha1-tls-implicit-iv", "$(location src/crypto/cipher/test/aes_256_cbc_sha1_tls_implicit_iv_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_256_cbc_sha1_tls_implicit_iv_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_256_cbc_sha256_tls", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-256-cbc-sha256-tls", "$(location src/crypto/cipher/test/aes_256_cbc_sha256_tls_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_256_cbc_sha256_tls_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_256_cbc_sha384_tls", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-256-cbc-sha384-tls", "$(location src/crypto/cipher/test/aes_256_cbc_sha384_tls_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_256_cbc_sha384_tls_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_des_ede3_cbc_sha1_tls", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "des-ede3-cbc-sha1-tls", "$(location src/crypto/cipher/test/des_ede3_cbc_sha1_tls_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/des_ede3_cbc_sha1_tls_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_des_ede3_cbc_sha1_tls_implicit_iv", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "des-ede3-cbc-sha1-tls-implicit-iv", "$(location src/crypto/cipher/test/des_ede3_cbc_sha1_tls_implicit_iv_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/des_ede3_cbc_sha1_tls_implicit_iv_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_rc4_md5_ssl3", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "rc4-md5-ssl3", "$(location src/crypto/cipher/test/rc4_md5_ssl3_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/rc4_md5_ssl3_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_rc4_sha1_ssl3", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "rc4-sha1-ssl3", "$(location src/crypto/cipher/test/rc4_sha1_ssl3_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/rc4_sha1_ssl3_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_128_cbc_sha1_ssl3", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-128-cbc-sha1-ssl3", "$(location src/crypto/cipher/test/aes_128_cbc_sha1_ssl3_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_128_cbc_sha1_ssl3_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_256_cbc_sha1_ssl3", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-256-cbc-sha1-ssl3", "$(location src/crypto/cipher/test/aes_256_cbc_sha1_ssl3_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_256_cbc_sha1_ssl3_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_des_ede3_cbc_sha1_ssl3", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "des-ede3-cbc-sha1-ssl3", "$(location src/crypto/cipher/test/des_ede3_cbc_sha1_ssl3_tests.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/des_ede3_cbc_sha1_ssl3_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_128_ctr_hmac_sha256", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-128-ctr-hmac-sha256", "$(location src/crypto/cipher/test/aes_128_ctr_hmac_sha256.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_128_ctr_hmac_sha256.txt", ], deps = [":crypto"], ) native.cc_test( name = "aead_test_aes_256_ctr_hmac_sha256", size = "small", srcs = ["src/crypto/cipher/aead_test.cc"] + test_support_sources_complete, args = [ "aes-256-ctr-hmac-sha256", "$(location src/crypto/cipher/test/aes_256_ctr_hmac_sha256.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/aes_256_ctr_hmac_sha256.txt", ], deps = [":crypto"], ) native.cc_test( name = "cipher_test", size = "small", srcs = ["src/crypto/cipher/cipher_test.cc"] + test_support_sources_complete, args = [ "$(location src/crypto/cipher/test/cipher_test.txt)", ], copts = copts, data = [ "src/crypto/cipher/test/cipher_test.txt", ], deps = [":crypto"], ) native.cc_test( name = "cmac_test", size = "small", srcs = ["src/crypto/cmac/cmac_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "constant_time_test", size = "small", srcs = ["src/crypto/constant_time_test.c"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "ed25519_test", size = "small", srcs = ["src/crypto/curve25519/ed25519_test.cc"] + test_support_sources_complete, args = [ "$(location src/crypto/curve25519/ed25519_tests.txt)", ], copts = copts, data = [ "src/crypto/curve25519/ed25519_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "x25519_test", size = "small", srcs = ["src/crypto/curve25519/x25519_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "dh_test", size = "small", srcs = ["src/crypto/dh/dh_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "digest_test", size = "small", srcs = ["src/crypto/digest/digest_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "dsa_test", size = "small", srcs = ["src/crypto/dsa/dsa_test.c"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "ec_test", size = "small", srcs = ["src/crypto/ec/ec_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "example_mul", size = "small", srcs = ["src/crypto/ec/example_mul.c"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "ecdsa_test", size = "small", srcs = ["src/crypto/ecdsa/ecdsa_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "err_test", size = "small", srcs = ["src/crypto/err/err_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "evp_extra_test", size = "small", srcs = ["src/crypto/evp/evp_extra_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "evp_test", size = "small", srcs = ["src/crypto/evp/evp_test.cc"] + test_support_sources_complete, args = [ "$(location src/crypto/evp/evp_tests.txt)", ], copts = copts, data = [ "src/crypto/evp/evp_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "pbkdf_test", size = "small", srcs = ["src/crypto/evp/pbkdf_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "hkdf_test", size = "small", srcs = ["src/crypto/hkdf/hkdf_test.c"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "hmac_test", size = "small", srcs = ["src/crypto/hmac/hmac_test.cc"] + test_support_sources_complete, args = [ "$(location src/crypto/hmac/hmac_tests.txt)", ], copts = copts, data = [ "src/crypto/hmac/hmac_tests.txt", ], deps = [":crypto"], ) native.cc_test( name = "lhash_test", size = "small", srcs = ["src/crypto/lhash/lhash_test.c"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "gcm_test", size = "small", srcs = ["src/crypto/modes/gcm_test.c"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "pkcs8_test", size = "small", srcs = ["src/crypto/pkcs8/pkcs8_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "pkcs12_test", size = "small", srcs = ["src/crypto/pkcs8/pkcs12_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "poly1305_test", size = "small", srcs = ["src/crypto/poly1305/poly1305_test.cc"] + test_support_sources_complete, args = [ "$(location src/crypto/poly1305/poly1305_test.txt)", ], copts = copts, data = [ "src/crypto/poly1305/poly1305_test.txt", ], deps = [":crypto"], ) native.cc_test( name = "refcount_test", size = "small", srcs = ["src/crypto/refcount_test.c"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "rsa_test", size = "small", srcs = ["src/crypto/rsa/rsa_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "thread_test", size = "small", srcs = ["src/crypto/thread_test.c"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "pkcs7_test", size = "small", srcs = ["src/crypto/x509/pkcs7_test.c"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "x509_test", size = "small", srcs = ["src/crypto/x509/x509_test.cc"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "tab_test", size = "small", srcs = ["src/crypto/x509v3/tab_test.c"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "v3name_test", size = "small", srcs = ["src/crypto/x509v3/v3name_test.c"] + test_support_sources_complete, copts = copts, deps = [":crypto"], ) native.cc_test( name = "pqueue_test", size = "small", srcs = ["src/ssl/pqueue/pqueue_test.c"] + test_support_sources_complete, copts = copts, deps = [ ":crypto", ":ssl", ], ) native.cc_test( name = "ssl_test", size = "small", srcs = ["src/ssl/ssl_test.cc"] + test_support_sources_complete, copts = copts, deps = [ ":crypto", ":ssl", ], )
# -*- coding: utf-8 -*- # try something like def index(): sync.go() return dict(message="hello from sync.py")
{ "metadata": { "kernelspec": { "name": "python" }, "language_info": { "name": "python", "version": "3.5.1" } }, "nbformat": 4, "nbformat_minor": 0, "cells": [ { "cell_type": "markdown", "source": "**I'll explain the steps involved in PCA with codes without implemeting scikit-learn.In the end we'll see the shortcut(alternative) way to apply PCA using Scikit-learn.The main aim of this tutorial is to explain what actually happens in background when you apply PCA algorithm.**", "metadata": {} }, { "cell_type": "code", "source": "# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load in \n# Input data files are available in the \"../input/\" directory.\n# For example, running this (by clicking run or pressing Shift+Enter) will list the files in the input directory\n\nfrom subprocess import check_output\nprint(check_output([\"ls\", \"../input\"]).decode(\"utf8\"))\n\n# Any results you write to the current directory are saved as output.", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "# 1)Let us first import all the necessary libraries", "metadata": {} }, { "cell_type": "code", "source": "import numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport matplotlib as mpl\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n%matplotlib inline", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "# 2)Loading the dataset\nTo import the dataset we will use Pandas library.It is the best Python library to play with the dataset and has a lot of functionalities. ", "metadata": {} }, { "cell_type": "code", "source": "df = pd.read_csv('../input/HR_comma_sep.csv')", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "columns_names=df.columns.tolist()\nprint(\"Columns names:\")\nprint(columns_names)", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "df.columns.tolist() fetches all the columns and then convert it into list type.This step is just to check out all the column names in our data.Columns are also called as features of our datasets.", "metadata": {} }, { "cell_type": "code", "source": "df.head()", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "df.head() displays first five rows of our datasets.", "metadata": {} }, { "cell_type": "code", "source": "df.corr()", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "**df.corr()** compute pairwise correlation of columns.Correlation shows how the two variables are related to each other.Positive values shows as one variable increases other variable increases as well. Negative values shows as one variable increases other variable decreases.Bigger the values,more strongly two varibles are correlated and viceversa.", "metadata": {} }, { "cell_type": "markdown", "source": "**Visualising correlation using Seaborn library**", "metadata": {} }, { "cell_type": "code", "source": "correlation = df.corr()\nplt.figure(figsize=(10,10))\nsns.heatmap(correlation, vmax=1, square=True,annot=True,cmap='cubehelix')\n\nplt.title('Correlation between different fearures')", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "**Doing some visualisation before moving onto PCA**", "metadata": {} }, { "cell_type": "code", "source": "df['sales'].unique()", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "Here we are printing all the unique values in **sales** columns", "metadata": {} }, { "cell_type": "code", "source": "sales=df.groupby('sales').sum()\nsales", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "df['sales'].unique()", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "groupby_sales=df.groupby('sales').mean()\ngroupby_sales", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "IT=groupby_sales['satisfaction_level'].IT\nRandD=groupby_sales['satisfaction_level'].RandD\naccounting=groupby_sales['satisfaction_level'].accounting\nhr=groupby_sales['satisfaction_level'].hr\nmanagement=groupby_sales['satisfaction_level'].management\nmarketing=groupby_sales['satisfaction_level'].marketing\nproduct_mng=groupby_sales['satisfaction_level'].product_mng\nsales=groupby_sales['satisfaction_level'].sales\nsupport=groupby_sales['satisfaction_level'].support\ntechnical=groupby_sales['satisfaction_level'].technical\ntechnical", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "\ndepartment_name=('sales', 'accounting', 'hr', 'technical', 'support', 'management',\n 'IT', 'product_mng', 'marketing', 'RandD')\ndepartment=(sales, accounting, hr, technical, support, management,\n IT, product_mng, marketing, RandD)\ny_pos = np.arange(len(department))\nx=np.arange(0,1,0.1)\n\nplt.barh(y_pos, department, align='center', alpha=0.8)\nplt.yticks(y_pos,department_name )\nplt.xlabel('Satisfaction level')\nplt.title('Mean Satisfaction Level of each department')", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "# Principal Component Analysis", "metadata": {} }, { "cell_type": "code", "source": "df.head()", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "df_drop=df.drop(labels=['sales','salary'],axis=1)\ndf_drop.head()", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "**df.drop()** is the method to drop the columns in our dataframe", "metadata": {} }, { "cell_type": "markdown", "source": "Now we need to bring \"left\" column to the front as it is the label and not the feature.", "metadata": {} }, { "cell_type": "code", "source": "cols = df_drop.columns.tolist()\ncols", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "Here we are converting columns of the dataframe to list so it would be easier for us to reshuffle the columns.We are going to use cols.insert method", "metadata": {} }, { "cell_type": "code", "source": "cols.insert(0, cols.pop(cols.index('left')))", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "cols", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "df_drop = df_drop.reindex(columns= cols)", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "By using df_drop.reindex(columns= cols) we are converting list to columns again", "metadata": {} }, { "cell_type": "markdown", "source": "Now we are separating features of our dataframe from the labels.", "metadata": {} }, { "cell_type": "code", "source": "X = df_drop.iloc[:,1:8].values\ny = df_drop.iloc[:,0].values\nX", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "y", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "np.shape(X)", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "Thus X is now matrix with 14999 rows and 7 columns", "metadata": {} }, { "cell_type": "code", "source": "np.shape(y)", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "y is now matrix with 14999 rows and 1 column", "metadata": {} }, { "cell_type": "markdown", "source": "# 4) Data Standardisation\nStandardization refers to shifting the distribution of each attribute to have a mean of zero and a standard deviation of one (unit variance). It is useful to standardize attributes for a model.\nStandardization of datasets is a common requirement for many machine learning estimators implemented in scikit-learn; they might behave badly if the individual features do not more or less look like standard normally distributed data ", "metadata": {} }, { "cell_type": "code", "source": "from sklearn.preprocessing import StandardScaler\nX_std = StandardScaler().fit_transform(X)", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "# 5) Computing Eigenvectors and Eigenvalues:\nBefore computing Eigen vectors and values we need to calculate covariance matrix.", "metadata": {} }, { "cell_type": "markdown", "source": "## Covariance matrix", "metadata": {} }, { "cell_type": "code", "source": "mean_vec = np.mean(X_std, axis=0)\ncov_mat = (X_std - mean_vec).T.dot((X_std - mean_vec)) / (X_std.shape[0]-1)\nprint('Covariance matrix \\n%s' %cov_mat)", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "print('NumPy covariance matrix: \\n%s' %np.cov(X_std.T))", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "Equivalently we could have used Numpy np.cov to calculate covariance matrix", "metadata": {} }, { "cell_type": "code", "source": "plt.figure(figsize=(8,8))\nsns.heatmap(cov_mat, vmax=1, square=True,annot=True,cmap='cubehelix')\n\nplt.title('Correlation between different features')", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "# Eigen decomposition of the covariance matrix", "metadata": {} }, { "cell_type": "code", "source": "eig_vals, eig_vecs = np.linalg.eig(cov_mat)\n\nprint('Eigenvectors \\n%s' %eig_vecs)\nprint('\\nEigenvalues \\n%s' %eig_vals)", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "# 6) Selecting Principal Components¶", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "# 6) Selecting Principal Components\n\nT\nIn order to decide which eigenvector(s) can dropped without losing too much information for the construction of lower-dimensional subspace, we need to inspect the corresponding eigenvalues: The eigenvectors with the lowest eigenvalues bear the least information about the distribution of the data; those are the ones can be dropped.", "metadata": {} }, { "cell_type": "code", "source": "# Make a list of (eigenvalue, eigenvector) tuples\neig_pairs = [(np.abs(eig_vals[i]), eig_vecs[:,i]) for i in range(len(eig_vals))]\n\n# Sort the (eigenvalue, eigenvector) tuples from high to low\neig_pairs.sort(key=lambda x: x[0], reverse=True)\n\n# Visually confirm that the list is correctly sorted by decreasing eigenvalues\nprint('Eigenvalues in descending order:')\nfor i in eig_pairs:\n print(i[0])", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "**Explained Variance**\nAfter sorting the eigenpairs, the next question is \"how many principal components are we going to choose for our new feature subspace?\" A useful measure is the so-called \"explained variance,\" which can be calculated from the eigenvalues. The explained variance tells us how much information (variance) can be attributed to each of the principal components.", "metadata": {} }, { "cell_type": "code", "source": "tot = sum(eig_vals)\nvar_exp = [(i / tot)*100 for i in sorted(eig_vals, reverse=True)]", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "with plt.style.context('dark_background'):\n plt.figure(figsize=(6, 4))\n\n plt.bar(range(7), var_exp, alpha=0.5, align='center',\n label='individual explained variance')\n plt.ylabel('Explained variance ratio')\n plt.xlabel('Principal components')\n plt.legend(loc='best')\n plt.tight_layout()", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "The plot above clearly shows that maximum variance (somewhere around 26%) can be explained by the first principal component alone. The second,third,fourth and fifth principal component share almost equal amount of information.Comparatively 6th and 7th components share less amount of information as compared to the rest of the Principal components.But those information cannot be ignored since they both contribute almost 17% of the data.But we can drop the last component as it has less than 10% of the variance", "metadata": {} }, { "cell_type": "markdown", "source": "**Projection Matrix**", "metadata": {} }, { "cell_type": "markdown", "source": "The construction of the projection matrix that will be used to transform the Human resouces analytics data onto the new feature subspace. Suppose only 1st and 2nd principal component shares the maximum amount of information say around 90%.Hence we can drop other components. Here, we are reducing the 7-dimensional feature space to a 2-dimensional feature subspace, by choosing the “top 2” eigenvectors with the highest eigenvalues to construct our d×k-dimensional eigenvector matrix W", "metadata": {} }, { "cell_type": "code", "source": "matrix_w = np.hstack((eig_pairs[0][1].reshape(7,1), \n eig_pairs[1][1].reshape(7,1)\n ))\nprint('Matrix W:\\n', matrix_w)", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "**Projection Onto the New Feature Space**\nIn this last step we will use the 7×2-dimensional projection matrix W to transform our samples onto the new subspace via the equation\n**Y=X×W**", "metadata": {} }, { "cell_type": "code", "source": "Y = X_std.dot(matrix_w)\nY", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "# PCA in scikit-learn", "metadata": {} }, { "cell_type": "code", "source": "from sklearn.decomposition import PCA\npca = PCA().fit(X_std)\nplt.plot(np.cumsum(pca.explained_variance_ratio_))\nplt.xlim(0,7,1)\nplt.xlabel('Number of components')\nplt.ylabel('Cumulative explained variance')", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "The above plot shows almost 90% variance by the first 6 components. Therfore we can drop 7th component.", "metadata": {} }, { "cell_type": "code", "source": "from sklearn.decomposition import PCA \nsklearn_pca = PCA(n_components=6)\nY_sklearn = sklearn_pca.fit_transform(X_std)", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "print(Y_sklearn)", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "code", "source": "Y_sklearn.shape", "execution_count": null, "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": "Thus Principal Component Analysis is used to remove the redundant features from the datasets without losing much information.These features are low dimensional in nature.The first component has the highest variance followed by second, third and so on.PCA works best on data set having 3 or higher dimensions. Because, with higher dimensions, it becomes increasingly difficult to make interpretations from the resultant cloud of data.", "metadata": {} }, { "cell_type": "markdown", "source": "You can find my notebook on Github: \n(\"https://github.com/nirajvermafcb/Principal-component-analysis-PCA-/blob/master/Principal%2Bcomponent%2Banalysis.ipynb\")", "metadata": {} }, { "cell_type": "markdown", "source": "Here is my notebook for Principal Component Analysis with Scikit-learn:\n(https://www.kaggle.com/nirajvermafcb/d/nsrose7224/crowdedness-at-the-campus-gym/principal-component-analysis-with-scikit-learn)", "metadata": {} }, { "cell_type": "code", "source": null, "execution_count": null, "outputs": [], "metadata": {} } ] }
print(f'{" LOJAS NASCIMENTO ":=^40}') preco = float(input('Preço das compras: R$ ')) print('''FORMAS DE PAGAMENTO [ 1 ] à vista dinheiro/cheque; [ 2 ] à vista cartão; [ 3 ] 2x no cartão; [ 4 ] 3x ou mais no cartão.''') opcao = int(input('Qual é a opção? ')) if opcao == 1: total = preco - (preco * 10 / 100) elif opcao == 2: total = preco - (preco * 5 / 100) elif opcao == 3: total = preco parcela = total / 2 print('Sua compra será parcelada em 2x de R$ {:.2f} SEM JUROS.'.format(parcela)) elif opcao == 4: total = preco + (preco * 20 / 100) totparc = int(input('Quantas parcelas? ')) parcela = total / totparc print('Sua parcela será parcelada em {}x de R$ {:.2f} COM JUROS.'.format(totparc, parcela)) else: total = preco print('OPÇÃO INVÁLIDA de pagamento. Tente novamente!') print('Sua compra de R$ {:.2f} vai custar R$ {:.2f} no final.'.format(preco, total))
# -*- coding: utf-8 -*- # @Author: 何睿 # @Create Date: 2018-11-15 15:41:11 # @Last Modified by: 何睿 # @Last Modified time: 2018-11-15 15:57:21 # You're now a baseball game point recorder. # Given a list of strings, each string can be one of the 4 following types: # Integer (one round's score): Directly represents the number of points you get in this round. # "+" (one round's score): Represents that the points you get in this round are the sum of the last two valid round's points. # "D" (one round's score): Represents that the points you get in this round are the doubled data of the last valid round's points. # "C" (an operation, which isn't a round's score): Represents the last valid round's points you get were invalid and should be removed. # Each round's operation is permanent and could have an impact on the round before and the round after. # You need to return the sum of the points you could get in all the rounds. # Example 1: # Input: ["5","2","C","D","+"] # Output: 30 # Explanation: # Round 1: You could get 5 points. The sum is: 5. # Round 2: You could get 2 points. The sum is: 7. # Operation 1: The round 2's data was invalid. The sum is: 5. # Round 3: You could get 10 points (the round 2's data has been removed). The sum is: 15. # Round 4: You could get 5 + 10 = 15 points. The sum is: 30. # Example 2: # Input: ["5","-2","4","C","D","9","+","+"] # Output: 27 # Explanation: # Round 1: You could get 5 points. The sum is: 5. # Round 2: You could get -2 points. The sum is: 3. # Round 3: You could get 4 points. The sum is: 7. # Operation 1: The round 3's data is invalid. The sum is: 3. # Round 4: You could get -4 points (the round 3's data has been removed). The sum is: -1. # Round 5: You could get 9 points. The sum is: 8. # Round 6: You could get -4 + 9 = 5 points. The sum is 13. # Round 7: You could get 9 + 5 = 14 points. The sum is 27. # Note: # The size of the input list will be between 1 and 1000. # Every integer represented in the list will be between -30000 and 30000. class Solution(object): def calPoints(self, ops): """ :type ops: List[str] :rtype: int """ stack = [] for item in ops: if item == "C": stack.pop() elif item == "D": stack.append(2 * int(stack[-1])) elif item == "+": stack.append(stack[-1]+stack[-2]) else: stack.append(int(item)) return sum(stack) if __name__ == "__main__": so = Solution() res = so.calPoints(["-21", "-66", "39", "+", "+"]) print(res)
def test(): assert Span.has_extension( "wikipedia_url" ), "你有在span上注册这个扩展吗?" ext = Span.get_extension("wikipedia_url") assert ext[2] is not None, "你有正确设置getter吗?" assert ( "getter=get_wikipedia_url" in __solution__ ), "你有设置getter为get_wikipedia_url了吗?" assert ( "(ent.text, ent._.wikipedia_url)" in __solution__ ), "你有读取到定制化属性了吗?" assert ( doc.ents[-1]._.wikipedia_url == "https://zh.wikipedia.org/w/index.php?search=周杰伦" ), "貌似这个属性的值是错误的。" __msg__.good( "漂亮!我们现在有了一个定制化的模型组件,使用模型预测的命名实体来生成" "维基百科的URL,然后把它们设定成为一个定制化属性。可以在浏览器中打开这" "个网址看看吧!" )
class Solution(object): def findDisappearedNumbers(self, nums): Out = [] N = set(nums) n = len(nums) for i in range(1, n+1): if i not in N: Out.append(i) return Out nums = [4,3,2,7,8,2,3,1] Object = Solution() print(Object.findDisappearedNumbers(nums))
# Copyright 2019 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. """Starlark transition support for Apple rules.""" def _cpu_string(platform_type, settings): """Generates a <platform>_<arch> string for the current target based on the given parameters.""" if platform_type == "ios": ios_cpus = settings["//command_line_option:ios_multi_cpus"] if ios_cpus: return "ios_{}".format(ios_cpus[0]) cpu_value = settings["//command_line_option:cpu"] if cpu_value.startswith("ios_"): return cpu_value return "ios_x86_64" if platform_type == "macos": macos_cpus = settings["//command_line_option:macos_cpus"] if macos_cpus: return "darwin_{}".format(macos_cpus[0]) return "darwin_x86_64" if platform_type == "tvos": tvos_cpus = settings["//command_line_option:tvos_cpus"] if tvos_cpus: return "tvos_{}".format(tvos_cpus[0]) return "tvos_x86_64" if platform_type == "watchos": watchos_cpus = settings["//command_line_option:watchos_cpus"] if watchos_cpus: return "watchos_{}".format(watchos_cpus[0]) return "watchos_i386" fail("ERROR: Unknown platform type: {}".format(platform_type)) def _min_os_version_or_none(attr, platform): if attr.platform_type == platform: return attr.minimum_os_version return None def _apple_rule_transition_impl(settings, attr): """Rule transition for Apple rules.""" return { "//command_line_option:apple configuration distinguisher": "applebin_" + attr.platform_type, "//command_line_option:apple_platform_type": attr.platform_type, "//command_line_option:apple_split_cpu": "", "//command_line_option:compiler": settings["//command_line_option:apple_compiler"], "//command_line_option:cpu": _cpu_string(attr.platform_type, settings), "//command_line_option:crosstool_top": ( settings["//command_line_option:apple_crosstool_top"] ), "//command_line_option:fission": [], "//command_line_option:grte_top": settings["//command_line_option:apple_grte_top"], "//command_line_option:ios_minimum_os": _min_os_version_or_none(attr, "ios"), "//command_line_option:macos_minimum_os": _min_os_version_or_none(attr, "macos"), "//command_line_option:tvos_minimum_os": _min_os_version_or_none(attr, "tvos"), "//command_line_option:watchos_minimum_os": _min_os_version_or_none(attr, "watchos"), } # These flags are a mix of options defined in native Bazel from the following fragments: # - https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/analysis/config/CoreOptions.java # - https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java # - https://github.com/bazelbuild/bazel/blob/master/src/main/java/com/google/devtools/build/lib/rules/cpp/CppOptions.java _apple_rule_transition = transition( implementation = _apple_rule_transition_impl, inputs = [ "//command_line_option:apple_compiler", "//command_line_option:apple_crosstool_top", "//command_line_option:apple_grte_top", "//command_line_option:cpu", "//command_line_option:ios_multi_cpus", "//command_line_option:macos_cpus", "//command_line_option:tvos_cpus", "//command_line_option:watchos_cpus", ], outputs = [ "//command_line_option:apple configuration distinguisher", "//command_line_option:apple_platform_type", "//command_line_option:apple_split_cpu", "//command_line_option:compiler", "//command_line_option:cpu", "//command_line_option:crosstool_top", "//command_line_option:fission", "//command_line_option:grte_top", "//command_line_option:ios_minimum_os", "//command_line_option:macos_minimum_os", "//command_line_option:tvos_minimum_os", "//command_line_option:watchos_minimum_os", ], ) def _static_framework_transition_impl(settings, attr): """Attribute transition for static frameworks to enable swiftinterface generation.""" return { "@build_bazel_rules_swift//swift:emit_swiftinterface": True, } # This transition is used, for now, to enable swiftinterface generation on swift_library targets. # Once apple_common.split_transition is migrated to Starlark, this transition should be merged into # that one, being enabled by reading either a private attribute on the static framework rules, or # some other mechanism, so that it is only enabled on static framework rules and not all Apple # rules. _static_framework_transition = transition( implementation = _static_framework_transition_impl, inputs = [], outputs = [ "@build_bazel_rules_swift//swift:emit_swiftinterface", ], ) transition_support = struct( apple_rule_transition = _apple_rule_transition, static_framework_transition = _static_framework_transition, )
def matmul(a, b): c = [] for i in range(0, len(a)): c.append([]) for k in range(0, len(b[0])): num = 0 for j in range(0, len(a[0])): num += a[i][j]*b[j][k] c[i].append(num) return c def main(): a = [[1,2],[3,4],[5,6]] b = [[3,2,1],[4,1,3]] d = matmul(a,b) print(a) print(b) print(d) if __name__ == '__main__': main()
class Path: def __init__(self, move_sequence): self.move_sequence = move_sequence def swap_cities(self, city1, city2): tmp = list(self.move_sequence) tmp[city1], tmp[city2] = tmp[city2], tmp[city1] return Path(tuple(tmp)) def __eq__(self, other): return self.move_sequence == other.move_sequence def __hash__(self): return hash(self.move_sequence) def __str__(self): return ' '.join([str(i + 1) for i in self.move_sequence] + [str(self.move_sequence[0] + 1)])
""" binary_tree.py Reference: https://www.geeksforgeeks.org/binary-search-tree-data-structure/#basic """ ## define a node class class Node(object): def __init__(self, value = None): self.value = value self.left = None self.right = None def set_value(self, value): self.value = value def get_value(self): return self.value def get_left_child(self): return self.left def get_right_child(self): return self.right # assumes this will replace any existing node if it's already assigned def set_left_child(self, node): self.left = node def set_right_child(self, node): self.right = node def has_left_child(self): return self.left != None def has_right_child(self): return self.right != None """ str() is used for creating output for end user while repr() is mainly used for debugging and development. repr’s goal is to be unambiguous and str’s is to be readable """ def __repr__(self): # printable representation return f"Node({self.get_value()})" def __str__(self): return f"Node({self.get_value()})" # define a binary tree class Tree(object): def __init__(self, value): self.root = Node(value) def get_root(self): return self.root # define a stack to keep track of the tree nodes # take advantage of Pythons list methods (LIFO) to push and pop class Stack(): def __init__(self): self.list = list() def push(self,value): self.list.append(value) def pop(self): return self.list.pop() # remove & return last value in list def top(self): if len(self.list) > 0: return self.list[-1] # end of list (LIFO) else: return None def is_empty(self): return len(self.list) == 0 def __repr__(self): if len(self.list) > 0: s = "<top of stack>\n_________________\n" s += "\n_________________\n".join([str(item) for item in self.list[::-1]]) s += "\n_________________\n<bottom of stack>" return s else: return "<stack is empty>" ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## Initial Check ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### node0 = Node() print(f"""node0: value: {node0.value} left: {node0.left} right: {node0.right} """) node0 = Node("apple") node1 = Node("banana") node2 = Node("orange") print(f"has left child? {node0.has_left_child()}") print(f"has right child? {node0.has_right_child()}") print("adding left and right children") node0.set_left_child(node1) node0.set_right_child(node2) print(f""" node 0: {node0.value} node 0 left child: {node0.left.value} node 0 right child: {node0.right.value} """) print(f"has left child? {node0.has_left_child()}") print(f"has right child? {node0.has_right_child()}") ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## Depth First Search (DFS) - Pre-order Traversal Check ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### tree = Tree("apple") tree.get_root().set_left_child(Node("banana")) tree.get_root().set_right_child(Node("cherry")) tree.get_root().get_left_child().set_left_child(Node("dates")) ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## Stack Check ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### """ stack = Stack() stack.push("apple") stack.push("banana") stack.push("cherry") stack.push("dates") print(stack.pop()) # remove 'dates' print("\n") print(stack) """ ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### # Depth first, pre-order traversal # pre-order traversal of the tree would visit the nodes in this order: # # apple, banana, dates, cherry # # Notice how we're retracing our steps. # It's like we are hiking on a trail, and trying to retrace our steps on the way back. # This is an indication that we should use a stack. ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### visit_order = list() stack = Stack() # start at the root node, visit it and then add it to the stack node = tree.get_root() visit_order.append(node.get_value()) stack.push(node) print(f""" =========================== visit_order {visit_order} stack: {stack} """) # check if apple has a left child print(f"{node} has left child? {node.has_left_child()}") # since apple has a left child (banana) # we'll visit banana and add it to the stack if( node.has_left_child()): node = node.get_left_child() print(f"visit {node}") visit_order.append(node.get_value()) stack.push(node) print(f""" =========================== visit_order {visit_order} stack: {stack} """) # check if banana has a left child print(f"{node} has left child? {node.has_left_child()}") # since banana has a left child "dates" # we'll visit "dates" and add it to the stack if( node.has_left_child()): node = node.get_left_child() print(f"visit {node}") visit_order.append(node.get_value()) stack.push(node) print(f""" visit_order {visit_order} stack: {stack} """) # check if "dates" has a left child print(f"{node} has left child? {node.has_left_child()}") # since dates doesn't have a left child, we'll check if it has a right child print(f"{node} has right child? {node.has_right_child()}") # since "dates" is a leaf node (has no children), we can start to retrace our steps # in other words, we can pop it off the stack. print(stack.pop()) stack # now we'll set the node to the new top of the stack, which is banana node = stack.top() print(node) # we already checked for banana's left child, so we'll check for its right child print(f"{node} has right child? {node.has_right_child()}") # banana doesn't have a right child, so we're also done tracking it. # so we can pop banana off the stack print(f"pop {stack.pop()} off stack") print(f""" stack {stack} """) # now we'll track the new top of the stack, which is apple node = stack.top() print(node) # we've already checked if apple has a left child; we'll check if it has a right child print(f"{node} has right child? {node.has_right_child()}") # since it has a right child (cherry), # we'll visit cherry and add it to the stack. if node.has_right_child(): node = node.get_right_child() print(f"visit {node}") visit_order.append(node.get_value()) stack.push(node) print(f""" visit_order {visit_order} stack {stack} """) # Now we'll check if cherry has a left child print(f"{node} has left child? {node.has_left_child()}") # it doesn't, so we'll check if it has a right child print(f"{node} has right child? {node.has_right_child()}") # since cherry has neither left nor right child nodes, # we are done tracking it, and can pop it off the stack print(f"pop {stack.pop()} off the stack") print(f""" visit_order {visit_order} stack {stack} """) # now we're back to apple at the top of the stack. # since we've already checked apple's left and right child nodes, # we can pop apple off the stack print(f"pop {stack.pop()} off stack") print(f"pre-order traversal visited nodes in this order: {visit_order}") print(f"""stack {stack}""")
split_data = lambda x: [[set(j) for j in i.split("\n")] for i in x] counter = lambda data, set_fn: sum(len(set_fn(*s)) for s in data) if __name__ == "__main__": with open("data.txt", "r") as file: data = split_data(file.read().strip().split("\n\n")) print("Part 1:", counter(data, set.union)) print("Part 2:", counter(data, set.intersection))
class PathFinder(object): """ Abstract class for a path finder """ def __init__(self, config): # type: (Namespace, Stepper) -> None self.config = config def path(self, from_lat, form_lng, to_lat, to_lng): # pragma: no cover # type: (float, float, float, float) -> List[(float, float)] raise NotImplementedError
class StickyNoteType(Enum, IComparable, IFormattable, IConvertible): """ Specifies whether a System.Windows.Controls.StickyNoteControl accepts text or ink. enum StickyNoteType,values: Ink (1),Text (0) """ def __eq__(self, *args): """ x.__eq__(y) <==> x==yx.__eq__(y) <==> x==yx.__eq__(y) <==> x==y """ pass def __format__(self, *args): """ __format__(formattable: IFormattable,format: str) -> str """ pass def __ge__(self, *args): pass def __gt__(self, *args): pass def __init__(self, *args): """ x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__init__(...) initializes x; see x.__class__.__doc__ for signature """ pass def __le__(self, *args): pass def __lt__(self, *args): pass def __ne__(self, *args): pass def __reduce_ex__(self, *args): pass def __str__(self, *args): pass Ink = None Text = None value__ = None
class Solution: def moveZeroes(self, nums): """ :type nums: List[int] :rtype: void Do not return anything, modify nums in-place instead. """ length = len(nums) for i in range(0, length - 1): if nums[i] != 0: continue k = i while nums[k] == 0 and k < length - 1: k += 1 if nums[k] != 0: nums[i], nums[k] = nums[k], 0 break def test_move_zeroes(): s = Solution() a = [0, 1, 0, 3, 12] s.moveZeroes(a) assert a == [1, 3, 12, 0, 0] a = [0, 1] s.moveZeroes(a) assert a == [1, 0] a = [0] s.moveZeroes(a) assert a == [0] a = [1] s.moveZeroes(a) assert a == [1]
f = open('file.txt','w') # 2.写入内容 f.write("test") # 3.保存文件 f.close() # 关闭文件 f = open('file.txt','r') # 2.写入内容 content = f.read() f.seek(0) content += f.read() print(content) # 3.保存文件 f.close() # 关闭文件
''' Stepik001146PyBeginch02p02st05TASK02_20200605.py В популярном сериале «Остаться в живых» использовалась последовательность чисел 4 8 15 16 23 42, которая принесла героям удачу и помогла сорвать джекпот в лотерее. Напишите программу, которая выводит данную последовательность чисел с одним пробелом между ними. ''' print(4, 8, 15, 16, 23, 42)
def pig_latin(word): a={'a','e','i','o','u'} #make vowels case insensitive vowels=a|set(b.upper() for b in a) if word[0].isalpha(): if any(i in vowels for i in word): if word.isalnum(): if word[0] in vowels: pig_version=word+'way' else: first_vowel=min(word.find(vowel) for vowel in vowels if vowel in word) #alternative way to locate first vowelin word #first_vowel = next((i for i, ch in enumerate(word) if ch in vowels),None) pig_version = word[first_vowel:]+word[:first_vowel]+'ay' return pig_version return 'word not english' return 'no vowel in word' return 'word must start with alphabet' #for word in ['wIll', 'dog', 'Category', 'chatter', 'trash','andela', 'mo$es', 'electrician', '2twa']: # print(pig_latin(word))
# File: S (Python 2.4) NORMAL = 0 CUSTOM = 1 EMOTE = 2 PIRATES_QUEST = 3 TOONTOWN_QUEST = 4
public_key = b"\x30\x81\x9f\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01\x01\x01\x05\x00\x03\x81\x8d\x00\x30\x81\x89\x02\x81\x81\x00\xd9\x7a\xcd" + \ b"\x72\x88\xaa\x98\x10\xee\x43\x50\x98\x95\x42\x98\x2d\x4d\xd7\x2c\xd6\x49\x9d\x4e\x37\x97\x53\x7a\xd3\x94\x8c\x93\x70\x22\xf1\x00" + \ b"\x4b\x4a\x46\xca\xfc\x9c\xa5\x87\xa1\x90\x68\xb9\x04\x79\x1d\x6a\x20\x31\xa2\xe9\x2c\xb1\x51\xb9\x53\xce\x58\x5f\x9c\xd2\xfc\x41" + \ b"\x24\x98\xed\x9e\x0c\x37\xc2\xab\x45\xfc\xbe\x11\x8b\x68\xc0\x4d\xb0\x0c\xb3\xea\x72\x19\xb7\x81\xa8\x3d\x4e\xb0\x59\xb2\xa7\xab" + \ b"\x2d\xac\xd1\xaf\xae\x77\x12\xd3\x30\x97\x28\xd5\xe7\x88\x34\x35\x10\x66\x45\x52\x5f\xea\xfb\x02\x9b\x75\x5c\x77\x67\x02\x03\x01" + \ b"\x00\x01" private_key = b"\x30\x82\x02\x75\x02\x01\x00\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01\x01\x01\x05\x00\x04\x82\x02\x5f\x30\x82\x02\x5b\x02\x01" + \ b"\x00\x02\x81\x81\x00\xd9\x7a\xcd\x72\x88\xaa\x98\x10\xee\x43\x50\x98\x95\x42\x98\x2d\x4d\xd7\x2c\xd6\x49\x9d\x4e\x37\x97\x53\x7a" + \ b"\xd3\x94\x8c\x93\x70\x22\xf1\x00\x4b\x4a\x46\xca\xfc\x9c\xa5\x87\xa1\x90\x68\xb9\x04\x79\x1d\x6a\x20\x31\xa2\xe9\x2c\xb1\x51\xb9" + \ b"\x53\xce\x58\x5f\x9c\xd2\xfc\x41\x24\x98\xed\x9e\x0c\x37\xc2\xab\x45\xfc\xbe\x11\x8b\x68\xc0\x4d\xb0\x0c\xb3\xea\x72\x19\xb7\x81" + \ b"\xa8\x3d\x4e\xb0\x59\xb2\xa7\xab\x2d\xac\xd1\xaf\xae\x77\x12\xd3\x30\x97\x28\xd5\xe7\x88\x34\x35\x10\x66\x45\x52\x5f\xea\xfb\x02" + \ b"\x9b\x75\x5c\x77\x67\x02\x03\x01\x00\x01\x02\x81\x80\x29\xf4\xde\x98\xe7\x93\xdd\xd5\x7a\x5a\x03\x3d\x04\xa2\xbd\xe0\x13\xa1\xdd" + \ b"\x15\x14\x4b\xa4\x50\xe6\x41\x65\x33\x57\x77\xcd\x63\xf7\x61\xbe\x58\x48\x22\xa3\x3b\x9b\xee\xf5\x5d\x2e\x92\x7d\x8b\x46\xe0\x6d" + \ b"\x5e\x7b\xa4\xfd\xce\x31\x01\x5e\xbb\x33\xd6\x69\xcf\x68\xc0\x15\x60\x99\xb6\x33\x6a\x59\x86\xe0\xd2\x62\x11\x76\x0c\xe9\x0c\x53" + \ b"\xa4\xa0\x24\x98\xeb\xfd\x05\xa7\x4f\xb1\xbc\xc9\x11\xc2\xdb\xbf\x55\xcd\x4e\x8a\x3f\x46\xb8\xf9\x55\x8c\xe8\x22\xda\xb2\x67\xf0" + \ b"\x71\xe2\xe0\x77\xa8\x00\x9d\x4e\x34\xcd\xdd\x77\x99\x02\x41\x00\xfd\x78\x72\x13\x37\x8d\xcb\x6b\x92\x52\x82\x12\x65\x60\x7b\x8a" + \ b"\xc4\x7a\x5e\xd4\xb8\x1a\xfa\x7f\x5e\xf8\x8a\x84\xf8\x1b\x7c\x28\xfc\x38\x74\xa0\x2e\x44\xc2\x13\x72\x05\xbd\x31\x49\xb9\xb1\x2d" + \ b"\x7a\xf1\x76\x25\x11\x09\xf9\x19\xdd\x02\xfa\xeb\x66\x06\x85\x59\x02\x41\x00\xdb\xa6\x68\xcb\x33\x55\xdb\xbf\x7e\x9b\xdb\xb5\x76" + \ b"\x1a\x1b\xca\x75\x0d\x12\xf2\xf1\x85\x87\x58\xf8\x7c\xee\x6c\x9d\xb9\x06\x1d\xb3\x9e\xad\xf8\xc8\x84\x9d\x8c\xe8\x65\x50\x42\x56" + \ b"\x56\xdc\x81\xd1\xad\xf5\xa9\x7d\xd2\x2e\xa7\x34\xfd\x63\x9e\x9a\xe5\x8a\xbf\x02\x40\x1d\x56\xed\xcd\x6f\xa6\xc8\x1f\x21\x86\xcf" + \ b"\x6b\x95\xb4\x7f\x58\x66\xb9\xcb\x74\x50\x03\x3f\x6f\xb2\xec\x8e\x0c\x2a\x33\xf4\x41\x42\x40\xbe\xaf\x33\xeb\xdd\x93\x26\xa5\xa7" + \ b"\x6a\xa7\x20\x09\x74\x3c\x40\xea\xee\x0b\x74\xde\x12\xb2\x54\x7f\xfa\xf3\x8a\x59\xb1\x02\x40\x5a\xaa\x7a\x1f\x46\x75\x6e\x5b\xc1" + \ b"\x3b\x3c\x99\xce\xc2\x40\x2e\x75\xda\x8b\xb3\xd4\x96\x35\xa4\x38\x0d\xf9\xac\xc3\xfe\x17\xd4\x32\xcc\x91\x2b\x5c\x39\xc1\x7e\xe4" + \ b"\x7e\xcd\x7e\x54\x7d\x4e\x50\x17\xe9\x22\xba\x6f\xc1\x4e\x98\x9e\x7a\xe9\xa0\x12\x78\x25\xa9\x02\x40\x0b\xff\x66\xb9\xf1\x6d\x18" + \ b"\xd9\x92\x64\x60\x16\x04\xdc\x39\x06\x56\xd5\xc9\x9c\x0c\x9b\x66\x06\x35\xf8\xd8\xa0\xa4\xff\xb4\x02\x9c\xaf\xb6\xab\x9a\xc0\x29" + \ b"\xb2\x17\x33\xac\x83\x10\x8c\x4c\x89\x44\x3e\xd0\x1e\x11\x61\x4a\xf5\xe3\xca\x26\x28\x38\x43\x7d\xeb" certs = [b"\x30\x82\x01\xb8\x30\x82\x01\x21\xa0\x03\x02\x01\x02\x02\x01\x00\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01\x01\x0b\x05\x00\x30" + \ b"\x22\x31\x20\x30\x1e\x06\x03\x55\x04\x03\x0c\x17\x63\x75\x73\x74\x6f\x6d\x5f\x65\x6e\x74\x72\x79\x5f\x70\x61\x73\x73\x77\x6f\x72" + \ b"\x64\x73\x31\x30\x1e\x17\x0d\x31\x36\x30\x35\x31\x38\x32\x32\x35\x33\x30\x36\x5a\x17\x0d\x31\x38\x30\x35\x31\x38\x32\x32\x35\x33" + \ b"\x30\x36\x5a\x30\x22\x31\x20\x30\x1e\x06\x03\x55\x04\x03\x0c\x17\x63\x75\x73\x74\x6f\x6d\x5f\x65\x6e\x74\x72\x79\x5f\x70\x61\x73" + \ b"\x73\x77\x6f\x72\x64\x73\x31\x30\x81\x9f\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01\x01\x01\x05\x00\x03\x81\x8d\x00\x30\x81\x89" + \ b"\x02\x81\x81\x00\xd9\x7a\xcd\x72\x88\xaa\x98\x10\xee\x43\x50\x98\x95\x42\x98\x2d\x4d\xd7\x2c\xd6\x49\x9d\x4e\x37\x97\x53\x7a\xd3" + \ b"\x94\x8c\x93\x70\x22\xf1\x00\x4b\x4a\x46\xca\xfc\x9c\xa5\x87\xa1\x90\x68\xb9\x04\x79\x1d\x6a\x20\x31\xa2\xe9\x2c\xb1\x51\xb9\x53" + \ b"\xce\x58\x5f\x9c\xd2\xfc\x41\x24\x98\xed\x9e\x0c\x37\xc2\xab\x45\xfc\xbe\x11\x8b\x68\xc0\x4d\xb0\x0c\xb3\xea\x72\x19\xb7\x81\xa8" + \ b"\x3d\x4e\xb0\x59\xb2\xa7\xab\x2d\xac\xd1\xaf\xae\x77\x12\xd3\x30\x97\x28\xd5\xe7\x88\x34\x35\x10\x66\x45\x52\x5f\xea\xfb\x02\x9b" + \ b"\x75\x5c\x77\x67\x02\x03\x01\x00\x01\x30\x0d\x06\x09\x2a\x86\x48\x86\xf7\x0d\x01\x01\x0b\x05\x00\x03\x81\x81\x00\xd6\x2c\x88\x43" + \ b"\x42\x2a\x0c\x8b\x1c\xd4\xe9\xd1\x16\xd5\x4b\xd3\x00\x5e\xeb\xa3\xdb\x21\x2c\x35\xb5\xbb\xa7\xc8\xb9\x58\x51\x34\x5b\x91\xf7\xc3" + \ b"\x17\x20\x6b\x18\x4d\x5f\x13\x42\x60\x17\x6e\x09\x82\x50\x55\x45\xd9\x6a\x74\xf5\xa9\x10\x3d\x2e\xf1\x16\xad\xa5\x0d\x25\xe7\x06" + \ b"\x22\x0e\x82\xae\x76\x80\x85\x3d\x0a\x3b\x20\x01\xc9\x42\xdd\x19\xfe\x1b\xda\x5d\x6d\x1b\xd7\x0d\x10\x39\x74\x97\xd7\x36\x8c\x1a" + \ b"\x56\x28\x98\x13\xaa\x35\xe7\xa4\xa0\xdd\x60\xba\xed\xca\x4e\xda\x57\x3b\xdf\xd7\xb8\xa7\x9f\xf1\x75\xa6\xbf\x0a"]
#################################################### # Quiz: len, max, min, and Lists #################################################### a = [1, 5, 8] b = [2, 6, 9, 10] c = [100, 200] print(max([len(a), len(b), len(c)])) # 4 print(min([len(a), len(b), len(c)])) # 2 #################################################### # Quiz: sorted, join, and Lists #################################################### names = ["Carol", "Albert", "Ben", "Donna"] print(" & ".join(sorted(names))) # Albert & Ben & Carol & Donna #################################################### # Quiz: append and Lists #################################################### names.append("Eugenia") print(sorted(names)) # ['Albert', 'Ben', 'Carol', 'Donna', 'Eugenia']
OPCODE = { "add": 0, "comp": 0, "and": 0, "xor": 0, "shll": 0, "shrl": 0, "shllv": 0, "shrlv": 0, "shra": 0, "shrav": 0, "addi": 8, "compi": 9, "lw": 16, "sw": 24, "b": 40, "br": 32, "bltz": 48, "bz": 49, "bnz": 50, "bl": 43, "bcy": 41, "bncy": 42, } RFORMATS = { "add", "comp", "and", "xor", "shll", "shrl", "shllv", "shrlv", "shra", "shrav"} FUNCODE = { "add": 1, "comp": 5, "and": 2, "xor": 3, "shll": 12, "shrl": 14, "shllv": 8, "shrlv": 10, "shra": 15, "shrav": 11, }
moves = open('input/day3-input.txt', 'r').read() visited = set() location = (0,0) visited.add(location) for move in moves: if move == '^': location = (location[0], location[1] + 1) elif move == 'v': location = (location[0], location[1] - 1) elif move == '>': location = (location[0] + 1, location[1]) elif move == '<': location = (location[0] - 1, location[1]) visited.add(location) print(len(visited))
def z3(): global bimage_mean, bimage_peak_fine, cell_dir, frame_i, nthread nthread = 1 # load plane filename for frame_i in range(imageframe_nmbr): with h5py.File(output_dir + 'brain_mask' + str(frame_i) + '.hdf5', 'r') as file_handle: image_mean = file_handle['image_mean'][()].T brain_mask = file_handle['brain_mask'][()].T image_peak_fine = file_handle['image_peak_fine'][()].T # broadcast image peaks (for initialization) and image_mean (for renormalization) bimage_peak_fine = sc.broadcast(image_peak_fine) bimage_mean = sc.broadcast(image_mean) # get initial estimate for the number of blocks blok_nmbr0 = brain_mask.size / (blok_cell_nmbr * cell_voxl_nmbr) # get initial block boundaries ijk = [] xyz = [] if lz == 1: blok_part = np.sqrt(blok_nmbr0) else: blok_part = np.cbrt(blok_nmbr0) blok_part = np.round(blok_part).astype(int) x0_range = np.unique(np.round(np.linspace(0, lx//ds, blok_part+1)).astype(int)) y0_range = np.unique(np.round(np.linspace(0, ly//ds, blok_part+1)).astype(int)) z0_range = np.unique(np.round(np.linspace(0, lz, blok_part+1)).astype(int)) for i, x0 in enumerate(x0_range): for j, y0 in enumerate(y0_range): for k, z0 in enumerate(z0_range): ijk.append([i, j, k]) xyz.append([x0, y0, z0]) dim = np.max(ijk, 0) XYZ = np.zeros(np.r_[dim+1, 3], dtype=int) XYZ[list(zip(*ijk))] = xyz xyz0 = [] xyz1 = [] for i in range(dim[0]): for j in range(dim[1]): for k in range(dim[2]): xyz0.append(XYZ[i , j , k]) xyz1.append(XYZ[i+1, j+1, k+1]) # get number of bloks and block boudaries blok_nmbr = len(xyz0) xyz0 = np.array(xyz0) xyz1 = np.array(xyz1) x0, y0, z0 = xyz0[:, 0], xyz0[:, 1], xyz0[:, 2] x1, y1, z1 = xyz1[:, 0], xyz1[:, 1], xyz1[:, 2] # get indices of remaining blocks to be done and run block detection cell_dir = output_dir + 'cell_series/' + str(frame_i) os.system('mkdir -p ' + cell_dir) blok_lidx = np.ones(blok_nmbr, dtype=bool) for i in range(blok_nmbr): blok_lidx[i] = np.any(brain_mask[x0[i]:x1[i], y0[i]:y1[i], z0[i]:z1[i]]) print(('Number of blocks: total, ' + str(blok_lidx.sum()) + '.')) # save number and indices of blocks with h5py.File(output_dir + 'brain_mask' + str(frame_i) + '.hdf5', 'r+') as file_handle: try: file_handle['blok_nmbr'] = blok_nmbr file_handle['blok_lidx'] = blok_lidx except RuntimeError: assert(np.allclose(blok_nmbr, file_handle['blok_nmbr'][()])) assert(np.allclose(blok_lidx, file_handle['blok_lidx'][()])) for i in np.where(blok_lidx)[0]: filename = cell_dir + '/Block' + str(i).zfill(5) + '.hdf5' if os.path.isfile(filename): try: with h5py.File(filename, 'r') as file_handle: if ('success' in list(file_handle.keys())) and file_handle['success'][()]: blok_lidx[i] = 0 except OSError: pass print(('Number of blocks: remaining, ' + str(blok_lidx.sum()) + '.')) ix = np.where(blok_lidx)[0] blok_ixyz01 = list(zip(ix, list(zip(x0[ix], x1[ix], y0[ix], y1[ix], z0[ix], z1[ix])))) if blok_lidx.any(): sc.parallelize(blok_ixyz01).foreach(blok_cell_detection) z3()
__all__ = ['AverageMeter', 'get_error', 'print_numbers_acc'] class AverageMeter(object): """Computes and stores the average and current value Imported from https://github.com/pytorch/examples/blob/master/imagenet/main.py#L247-L262 """ def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.summ = 0 self.count = 0 def update(self, val, n=1): self.val = val self.summ += val * n self.count += n self.avg = self.summ / self.count def get_error(scores, labels): """ https://github.com/xbresson/AI6103_2020 """ bs=scores.size(0) predicted_labels = scores.argmax(dim=1) indicator = (predicted_labels == labels) num_matches=indicator.sum() return num_matches.float()/bs def print_numbers_acc(accs, numbers=range(10)): assert len(accs) == len(numbers) assert type(accs[0]) == AverageMeter for t, a in zip(accs, numbers): print(f"{a}: {t.avg}") return {a:t.avg.item() for t, a in zip(accs, numbers)}
# -*- coding: utf-8 -*- """ Created on Thu Apr 25 17:52:09 2019 @author: Falble """ def has_duplicates(t): """Checks whether any element appears more than once in a sequence. Simple version using a for loop. t: sequence """ d = {} for x in t: if x in d: return True d[x] = True return False def has_duplicates2(t): """Checks whether any element appears more than once in a sequence. Faster version using a set. t: sequence """ return len(set(t)) < len(t) if __name__ == '__main__': t = [1, 2, 3] print(has_duplicates(t)) t.append(1) print(has_duplicates(t)) t = [1, 2, 3] print(has_duplicates2(t)) t.append(1) print(has_duplicates2(t))
def get_virus_areas(grid): areas = [] dangers = [] walls = [] color = [[0] * n for i in range(m)] for i in range(m): for j in range(n): if grid[i][j] == 1 and color[i][j] == 0: area = [(i, j)] danger = set() wall = 0 Q = [(i, j)] color[i][j] = 1 while Q: s, t = Q.pop(0) for ii, jj in adj(s, t): if grid[ii][jj] == 1 and color[ii][jj] == 0: color[ii][jj] = 1 Q.append((ii, jj)) area.append((ii, jj)) if grid[ii][jj] == 0: wall += 1 danger.add((ii, jj)) areas.append(area) dangers.append(danger) walls.append(wall) return areas, dangers, walls def spread_grid(grid): areas, dangers, walls = get_virus_areas(grid) def spread(dangers): for danger in dangers: for i, j in danger: grid[i][j] = 1 dangerest_i = 0 n_area = len(areas) for i in range(n_area): if len(dangers[i]) > len(dangers[dangerest_i]): dangerest_i = i spread(dangers[:dangerest_i] + dangers[dangerest_i + 1:])
target = df_data_card.columns[0] class_inputs = list(df_data_card.select_dtypes(include=['object']).columns) # impute data df_data_card = df_data_card.fillna(df_data_card.median()) df_data_card['JOB'] = df_data_card.JOB.fillna('Other') # dummy the categorical variables df_data_card_ABT = pd.concat([df_data_card, pd.get_dummies(df_data_card[class_inputs])], axis = 1).drop(class_inputs, axis = 1) df_all_inputs = df_data_card_ABT.drop(target, axis=1) X_train, X_valid, y_train, y_valid = train_test_split( df_all_inputs, df_data_card_ABT[target], test_size=0.33, random_state=54321) gb = GradientBoostingClassifier(random_state=54321) gb.fit(X_train, y_train)
#!/usr/bin/env python3 CENT_PER_INCH = 2.54 height_feet = int(input('Enter the "feet" part of your height: ')) height_inches = int(input('Enter the "inches" part of your height: ')) total_height_inches = height_feet * 12 + height_inches total_cent = total_height_inches * CENT_PER_INCH print(f"Your height of {height_feet}'{height_inches} " f"is {total_cent:,.1f} centimeters.")
print('Digite seis valores inteiros:') s = 0 cont = 0 for c in range(1, 7): n = int(input(f'{c}° valor: ')) if n % 2 == 0: s += n cont += 1 print(f'A soma do(s) {cont} valor(es) par(es) vale {s}.')
# Copyright 2013 Google, Inc. All Rights Reserved. # # Google Author(s): Behdad Esfahbod, Roozbeh Pournader class Options(object): class UnknownOptionError(Exception): pass def __init__(self, **kwargs): self.verbose = False self.timing = False self.drop_tables = [] self.set(**kwargs) def set(self, **kwargs): for k,v in kwargs.items(): if not hasattr(self, k): raise self.UnknownOptionError("Unknown option '%s'" % k) setattr(self, k, v) def parse_opts(self, argv, ignore_unknown=[]): ret = [] opts = {} for a in argv: orig_a = a if not a.startswith('--'): ret.append(a) continue a = a[2:] i = a.find('=') op = '=' if i == -1: if a.startswith("no-"): k = a[3:] v = False else: k = a v = True else: k = a[:i] if k[-1] in "-+": op = k[-1]+'=' # Ops is '-=' or '+=' now. k = k[:-1] v = a[i+1:] ok = k k = k.replace('-', '_') if not hasattr(self, k): if ignore_unknown is True or ok in ignore_unknown: ret.append(orig_a) continue else: raise self.UnknownOptionError("Unknown option '%s'" % a) ov = getattr(self, k) if isinstance(ov, bool): v = bool(v) elif isinstance(ov, int): v = int(v) elif isinstance(ov, list): vv = v.split(',') if vv == ['']: vv = [] vv = [int(x, 0) if len(x) and x[0] in "0123456789" else x for x in vv] if op == '=': v = vv elif op == '+=': v = ov v.extend(vv) elif op == '-=': v = ov for x in vv: if x in v: v.remove(x) else: assert 0 opts[k] = v self.set(**opts) return ret
def remove_void(lst:list): return list(filter(None, lst)) def remove_double_back(string:str): string.replace("\n\n","@@@@@").replace("\n","").replace("@@@@@","") def pretty_print(dct:dict): for val,key in dct.items(): print(val) for el in key: print("\t",el) print("\n")
n=int(input()) for i in range(1,n+1): for j in range(1,i+1): print(j,end="") print() for i in range(1,n): for j in range(n-i): print(j+1,end="") print()
# # PySNMP MIB module HUAWEI-UNIMNG-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-UNIMNG-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 19:37:33 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, ObjectIdentifier, Integer = mibBuilder.importSymbols("ASN1", "OctetString", "ObjectIdentifier", "Integer") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ConstraintsIntersection, SingleValueConstraint, ValueSizeConstraint, ValueRangeConstraint, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "ConstraintsIntersection", "SingleValueConstraint", "ValueSizeConstraint", "ValueRangeConstraint", "ConstraintsUnion") hwDatacomm, = mibBuilder.importSymbols("HUAWEI-MIB", "hwDatacomm") NotificationGroup, ModuleCompliance, ObjectGroup = mibBuilder.importSymbols("SNMPv2-CONF", "NotificationGroup", "ModuleCompliance", "ObjectGroup") Bits, NotificationType, Gauge32, Counter64, Integer32, TimeTicks, MibIdentifier, Bits, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32, ObjectIdentity, ModuleIdentity, IpAddress, Counter32, iso = mibBuilder.importSymbols("SNMPv2-SMI", "Bits", "NotificationType", "Gauge32", "Counter64", "Integer32", "TimeTicks", "MibIdentifier", "Bits", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32", "ObjectIdentity", "ModuleIdentity", "IpAddress", "Counter32", "iso") DisplayString, TextualConvention, AutonomousType, RowStatus, MacAddress = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention", "AutonomousType", "RowStatus", "MacAddress") hwUnimngMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327)) hwUnimngMIB.setRevisions(('2015-07-09 14:07', '2015-01-09 14:07', '2014-11-18 15:30', '2014-10-29 16:57', '2014-10-23 15:30', '2014-09-11 15:30', '2014-08-19 15:30', '2014-07-10 12:50', '2014-03-03 20:00',)) if mibBuilder.loadTexts: hwUnimngMIB.setLastUpdated('201507091407Z') if mibBuilder.loadTexts: hwUnimngMIB.setOrganization('Huawei Technologies Co.,Ltd.') class AlarmStatus(TextualConvention, Bits): reference = "ITU Recommendation X.731, 'Information Technology - Open Systems Interconnection - System Management: State Management Function', 1992" status = 'current' namedValues = NamedValues(("notSupported", 0), ("underRepair", 1), ("critical", 2), ("major", 3), ("minor", 4), ("alarmOutstanding", 5), ("warning", 6), ("indeterminate", 7)) hwUnimngObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 1)) hwUniMngEnable = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwUniMngEnable.setStatus('current') hwAsmngObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2)) hwAsTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1), ) if mibBuilder.loadTexts: hwAsTable.setStatus('current') hwAsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwAsIndex")) if mibBuilder.loadTexts: hwAsEntry.setStatus('current') hwAsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIndex.setStatus('current') hwAsHardwareVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsHardwareVersion.setStatus('current') hwAsIpAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 3), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsIpAddress.setStatus('current') hwAsIpNetMask = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 4), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsIpNetMask.setStatus('current') hwAsAccessUser = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 5), Integer32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsAccessUser.setStatus('current') hwAsMac = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 6), MacAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsMac.setStatus('current') hwAsSn = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 7), OctetString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsSn.setStatus('current') hwAsSysName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 8), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsSysName.setStatus('current') hwAsRunState = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("idle", 1), ("versionMismatch", 2), ("fault", 3), ("normal", 4)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsRunState.setStatus('current') hwAsSoftwareVersion = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 10), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsSoftwareVersion.setStatus('current') hwAsModel = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 11), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 23))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsModel.setStatus('current') hwAsDns = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 12), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsDns.setStatus('current') hwAsOnlineTime = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 13), OctetString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsOnlineTime.setStatus('current') hwAsCpuUseage = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 14), Integer32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsCpuUseage.setStatus('current') hwAsMemoryUseage = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 15), Integer32()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsMemoryUseage.setStatus('current') hwAsSysMac = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 16), MacAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsSysMac.setStatus('current') hwAsStackEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 17), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsStackEnable.setStatus('current') hwAsGatewayIp = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 18), IpAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsGatewayIp.setStatus('current') hwAsVpnInstance = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 19), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsVpnInstance.setStatus('current') hwAsRowstatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 1, 1, 50), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsRowstatus.setStatus('current') hwAsIfTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 2), ) if mibBuilder.loadTexts: hwAsIfTable.setStatus('current') hwAsIfEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 2, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwAsIfIndex")) if mibBuilder.loadTexts: hwAsIfEntry.setStatus('current') hwAsIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 2, 1, 1), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfIndex.setStatus('current') hwAsIfDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 2, 1, 2), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfDescr.setStatus('current') hwAsIfType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 2, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfType.setStatus('current') hwAsIfMtu = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 2, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwAsIfMtu.setStatus('current') hwAsIfSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 2, 1, 5), Gauge32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfSpeed.setStatus('current') hwAsIfPhysAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 2, 1, 6), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfPhysAddress.setStatus('current') hwAsIfAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 2, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwAsIfAdminStatus.setStatus('current') hwAsIfOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 2, 1, 8), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up", 1), ("down", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfOperStatus.setStatus('current') hwAsIfInUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 2, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfInUcastPkts.setStatus('current') hwAsIfOutUcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 2, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfOutUcastPkts.setStatus('current') hwAsIfXTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 3), ) if mibBuilder.loadTexts: hwAsIfXTable.setStatus('current') hwAsIfXEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 3, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwAsIfIndex")) if mibBuilder.loadTexts: hwAsIfXEntry.setStatus('current') hwAsIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 3, 1, 1), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfName.setStatus('current') hwAsIfLinkUpDownTrapEnable = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 3, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwAsIfLinkUpDownTrapEnable.setStatus('current') hwAsIfHighSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 3, 1, 3), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfHighSpeed.setStatus('current') hwAsIfAlias = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 3, 1, 4), OctetString()).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwAsIfAlias.setStatus('current') hwAsIfAsId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 3, 1, 5), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfAsId.setStatus('current') hwAsIfHCOutOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 3, 1, 6), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfHCOutOctets.setStatus('current') hwAsIfInMulticastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 3, 1, 7), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfInMulticastPkts.setStatus('current') hwAsIfInBroadcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 3, 1, 8), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfInBroadcastPkts.setStatus('current') hwAsIfOutMulticastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 3, 1, 9), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfOutMulticastPkts.setStatus('current') hwAsIfOutBroadcastPkts = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 3, 1, 10), Counter32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfOutBroadcastPkts.setStatus('current') hwAsIfHCInOctets = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 3, 1, 11), Counter64()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsIfHCInOctets.setStatus('current') hwAsSlotTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 4), ) if mibBuilder.loadTexts: hwAsSlotTable.setStatus('current') hwAsSlotEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 4, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwAsIndex"), (0, "HUAWEI-UNIMNG-MIB", "hwAsSlotId")) if mibBuilder.loadTexts: hwAsSlotEntry.setStatus('current') hwAsSlotId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 8))) if mibBuilder.loadTexts: hwAsSlotId.setStatus('current') hwAsSlotState = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 4, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsSlotState.setStatus('current') hwAsSlotRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 4, 1, 20), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsSlotRowStatus.setStatus('current') hwAsmngGlobalObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 5)) hwAsAutoReplaceEnable = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 5, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enabled", 1), ("disabled", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwAsAutoReplaceEnable.setStatus('current') hwAsAuthMode = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 5, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("auth", 1), ("noAuth", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwAsAuthMode.setStatus('current') hwAsMacWhitelistTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 6), ) if mibBuilder.loadTexts: hwAsMacWhitelistTable.setStatus('current') hwAsMacWhitelistEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 6, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwAsMacWhitelistMacAddr")) if mibBuilder.loadTexts: hwAsMacWhitelistEntry.setStatus('current') hwAsMacWhitelistMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 6, 1, 1), MacAddress()) if mibBuilder.loadTexts: hwAsMacWhitelistMacAddr.setStatus('current') hwAsMacWhitelistRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 6, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsMacWhitelistRowStatus.setStatus('current') hwAsMacBlacklistTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 7), ) if mibBuilder.loadTexts: hwAsMacBlacklistTable.setStatus('current') hwAsMacBlacklistEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 7, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwAsMacBlacklistMacAddr")) if mibBuilder.loadTexts: hwAsMacBlacklistEntry.setStatus('current') hwAsMacBlacklistMacAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 7, 1, 1), MacAddress()) if mibBuilder.loadTexts: hwAsMacBlacklistMacAddr.setStatus('current') hwAsMacBlacklistRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 7, 1, 2), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwAsMacBlacklistRowStatus.setStatus('current') hwAsEntityPhysicalTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 8), ) if mibBuilder.loadTexts: hwAsEntityPhysicalTable.setStatus('current') hwAsEntityPhysicalEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 8, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwAsIndex"), (0, "HUAWEI-UNIMNG-MIB", "hwAsEntityPhysicalIndex")) if mibBuilder.loadTexts: hwAsEntityPhysicalEntry.setStatus('current') hwAsEntityPhysicalIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 8, 1, 1), Integer32()) if mibBuilder.loadTexts: hwAsEntityPhysicalIndex.setStatus('current') hwAsEntityPhysicalDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 8, 1, 2), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityPhysicalDescr.setStatus('current') hwAsEntityPhysicalVendorType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 8, 1, 3), AutonomousType()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityPhysicalVendorType.setStatus('current') hwAsEntityPhysicalContainedIn = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 8, 1, 4), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityPhysicalContainedIn.setStatus('current') hwAsEntityPhysicalClass = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 8, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).clone(namedValues=NamedValues(("other", 1), ("unknown", 2), ("chassis", 3), ("backplane", 4), ("container", 5), ("powerSupply", 6), ("fan", 7), ("sensor", 8), ("module", 9), ("port", 10), ("stack", 11)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityPhysicalClass.setStatus('current') hwAsEntityPhysicalParentRelPos = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 8, 1, 6), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityPhysicalParentRelPos.setStatus('current') hwAsEntityPhysicalName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 8, 1, 7), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityPhysicalName.setStatus('current') hwAsEntityPhysicalHardwareRev = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 8, 1, 8), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityPhysicalHardwareRev.setStatus('current') hwAsEntityPhysicalFirmwareRev = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 8, 1, 9), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityPhysicalFirmwareRev.setStatus('current') hwAsEntityPhysicalSoftwareRev = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 8, 1, 10), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityPhysicalSoftwareRev.setStatus('current') hwAsEntityPhysicalSerialNum = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 8, 1, 11), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityPhysicalSerialNum.setStatus('current') hwAsEntityPhysicalMfgName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 8, 1, 12), OctetString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityPhysicalMfgName.setStatus('current') hwAsEntityStateTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 9), ) if mibBuilder.loadTexts: hwAsEntityStateTable.setStatus('current') hwAsEntityStateEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 9, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwAsIndex"), (0, "HUAWEI-UNIMNG-MIB", "hwAsEntityPhysicalIndex")) if mibBuilder.loadTexts: hwAsEntityStateEntry.setStatus('current') hwAsEntityAdminStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 9, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 11, 12, 13))).clone(namedValues=NamedValues(("notSupported", 1), ("locked", 2), ("shuttingDown", 3), ("unlocked", 4), ("up", 11), ("down", 12), ("loopback", 13)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityAdminStatus.setStatus('current') hwAsEntityOperStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 9, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 11, 12, 13, 15, 16, 17))).clone(namedValues=NamedValues(("notSupported", 1), ("disabled", 2), ("enabled", 3), ("offline", 4), ("up", 11), ("down", 12), ("connect", 13), ("protocolUp", 15), ("linkUp", 16), ("linkDown", 17)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityOperStatus.setStatus('current') hwAsEntityStandbyStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 9, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4))).clone(namedValues=NamedValues(("notSupported", 1), ("hotStandby", 2), ("coldStandby", 3), ("providingService", 4)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityStandbyStatus.setStatus('current') hwAsEntityAlarmLight = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 9, 1, 4), AlarmStatus()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityAlarmLight.setStatus('current') hwAsEntityPortType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 9, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("notSupported", 1), ("copper", 2), ("fiber100", 3), ("fiber1000", 4), ("fiber10000", 5), ("opticalnotExist", 6), ("optical", 7)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntityPortType.setStatus('current') hwAsEntityAliasMappingTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 10), ) if mibBuilder.loadTexts: hwAsEntityAliasMappingTable.setStatus('current') hwAsEntityAliasMappingEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 10, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwAsIndex"), (0, "HUAWEI-UNIMNG-MIB", "hwAsEntityPhysicalIndex"), (0, "HUAWEI-UNIMNG-MIB", "hwAsEntryAliasLogicalIndexOrZero")) if mibBuilder.loadTexts: hwAsEntityAliasMappingEntry.setStatus('current') hwAsEntryAliasLogicalIndexOrZero = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 10, 1, 1), Integer32()) if mibBuilder.loadTexts: hwAsEntryAliasLogicalIndexOrZero.setStatus('current') hwAsEntryAliasMappingIdentifier = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 2, 10, 1, 2), AutonomousType()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwAsEntryAliasMappingIdentifier.setStatus('current') hwTopomngObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3)) hwTopomngExploreTime = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 1440)).clone(10)).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwTopomngExploreTime.setStatus('current') hwTopomngLastCollectDuration = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3, 2), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwTopomngLastCollectDuration.setStatus('current') hwTopomngTopoTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3, 11), ) if mibBuilder.loadTexts: hwTopomngTopoTable.setStatus('current') hwTopomngTopoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3, 11, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwTopoLocalHop"), (0, "HUAWEI-UNIMNG-MIB", "hwTopoLocalMac"), (0, "HUAWEI-UNIMNG-MIB", "hwTopoPeerDeviceIndex")) if mibBuilder.loadTexts: hwTopomngTopoEntry.setStatus('current') hwTopoLocalHop = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3, 11, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 8))) if mibBuilder.loadTexts: hwTopoLocalHop.setStatus('current') hwTopoLocalMac = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3, 11, 1, 2), MacAddress()) if mibBuilder.loadTexts: hwTopoLocalMac.setStatus('current') hwTopoPeerDeviceIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3, 11, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))) if mibBuilder.loadTexts: hwTopoPeerDeviceIndex.setStatus('current') hwTopoPeerMac = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3, 11, 1, 4), MacAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwTopoPeerMac.setStatus('current') hwTopoLocalPortName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3, 11, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwTopoLocalPortName.setStatus('current') hwTopoPeerPortName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3, 11, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwTopoPeerPortName.setStatus('current') hwTopoLocalTrunkId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3, 11, 1, 7), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwTopoLocalTrunkId.setStatus('current') hwTopoPeerTrunkId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3, 11, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwTopoPeerTrunkId.setStatus('current') hwTopoLocalRole = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3, 11, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("roleUC", 1), ("roleAS", 2), ("roleAP", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwTopoLocalRole.setStatus('current') hwTopoPeerRole = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 3, 11, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("roleUC", 1), ("roleAS", 2), ("roleAP", 3)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwTopoPeerRole.setStatus('current') hwMbrmngObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 4)) hwMbrMngFabricPortTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 4, 2), ) if mibBuilder.loadTexts: hwMbrMngFabricPortTable.setStatus('current') hwMbrMngFabricPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 4, 2, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwMbrMngASId"), (0, "HUAWEI-UNIMNG-MIB", "hwMbrMngFabricPortId")) if mibBuilder.loadTexts: hwMbrMngFabricPortEntry.setStatus('current') hwMbrMngASId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 65535))) if mibBuilder.loadTexts: hwMbrMngASId.setStatus('current') hwMbrMngFabricPortId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 4, 2, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))) if mibBuilder.loadTexts: hwMbrMngFabricPortId.setStatus('current') hwMbrMngFabricPortMemberIfName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 4, 2, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMbrMngFabricPortMemberIfName.setStatus('current') hwMbrMngFabricPortDirection = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 4, 2, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("downDirection", 1), ("upDirection", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMbrMngFabricPortDirection.setStatus('current') hwMbrMngFabricPortIndirectFlag = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 4, 2, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("indirect", 1), ("direct", 2)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMbrMngFabricPortIndirectFlag.setStatus('current') hwMbrMngFabricPortDescription = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 4, 2, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 64))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwMbrMngFabricPortDescription.setStatus('current') hwVermngObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5)) hwVermngGlobalObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 1)) hwVermngFileServerType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 255))).clone(namedValues=NamedValues(("ftp", 1), ("sftp", 2), ("none", 255)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngFileServerType.setStatus('current') hwVermngUpgradeInfoTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2), ) if mibBuilder.loadTexts: hwVermngUpgradeInfoTable.setStatus('current') hwVermngUpgradeInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsIndex")) if mibBuilder.loadTexts: hwVermngUpgradeInfoEntry.setStatus('current') hwVermngUpgradeInfoAsIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))) if mibBuilder.loadTexts: hwVermngUpgradeInfoAsIndex.setStatus('current') hwVermngUpgradeInfoAsName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 2), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngUpgradeInfoAsName.setStatus('current') hwVermngUpgradeInfoAsSysSoftware = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 3), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngUpgradeInfoAsSysSoftware.setStatus('current') hwVermngUpgradeInfoAsSysSoftwareVer = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 4), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngUpgradeInfoAsSysSoftwareVer.setStatus('current') hwVermngUpgradeInfoAsSysPatch = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 5), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngUpgradeInfoAsSysPatch.setStatus('current') hwVermngUpgradeInfoAsDownloadSoftware = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 6), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngUpgradeInfoAsDownloadSoftware.setStatus('current') hwVermngUpgradeInfoAsDownloadSoftwareVer = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 7), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngUpgradeInfoAsDownloadSoftwareVer.setStatus('current') hwVermngUpgradeInfoAsDownloadPatch = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 8), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngUpgradeInfoAsDownloadPatch.setStatus('current') hwVermngUpgradeInfoAsUpgradeState = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 9), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 255))).clone(namedValues=NamedValues(("noUpgrade", 1), ("upgrading", 2), ("none", 255)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngUpgradeInfoAsUpgradeState.setStatus('current') hwVermngUpgradeInfoAsUpgradeType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 10), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 255))).clone(namedValues=NamedValues(("verSync", 1), ("manual", 2), ("none", 255)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngUpgradeInfoAsUpgradeType.setStatus('current') hwVermngUpgradeInfoAsFilePhase = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 11), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 255))).clone(namedValues=NamedValues(("systemSoftware", 1), ("patch", 2), ("none", 255)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngUpgradeInfoAsFilePhase.setStatus('current') hwVermngUpgradeInfoAsUpgradePhase = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 12), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 255))).clone(namedValues=NamedValues(("downloadFile", 1), ("wait", 2), ("activateFile", 3), ("reboot", 4), ("none", 255)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngUpgradeInfoAsUpgradePhase.setStatus('current') hwVermngUpgradeInfoAsUpgradeResult = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 13), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 255))).clone(namedValues=NamedValues(("successfully", 1), ("failed", 2), ("none", 255)))).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngUpgradeInfoAsUpgradeResult.setStatus('current') hwVermngUpgradeInfoAsErrorCode = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 14), Integer32()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngUpgradeInfoAsErrorCode.setStatus('current') hwVermngUpgradeInfoAsErrorDescr = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 2, 1, 15), DisplayString()).setMaxAccess("readonly") if mibBuilder.loadTexts: hwVermngUpgradeInfoAsErrorDescr.setStatus('current') hwVermngAsTypeCfgInfoTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 3), ) if mibBuilder.loadTexts: hwVermngAsTypeCfgInfoTable.setStatus('current') hwVermngAsTypeCfgInfoEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 3, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwVermngAsTypeCfgInfoAsTypeIndex")) if mibBuilder.loadTexts: hwVermngAsTypeCfgInfoEntry.setStatus('current') hwVermngAsTypeCfgInfoAsTypeIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 3, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))) if mibBuilder.loadTexts: hwVermngAsTypeCfgInfoAsTypeIndex.setStatus('current') hwVermngAsTypeCfgInfoAsTypeName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 3, 1, 2), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwVermngAsTypeCfgInfoAsTypeName.setStatus('current') hwVermngAsTypeCfgInfoSystemSoftware = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 3, 1, 3), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwVermngAsTypeCfgInfoSystemSoftware.setStatus('current') hwVermngAsTypeCfgInfoSystemSoftwareVer = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 3, 1, 4), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwVermngAsTypeCfgInfoSystemSoftwareVer.setStatus('current') hwVermngAsTypeCfgInfoPatch = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 3, 1, 5), DisplayString()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwVermngAsTypeCfgInfoPatch.setStatus('current') hwVermngAsTypeCfgInfoRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 5, 3, 1, 50), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwVermngAsTypeCfgInfoRowStatus.setStatus('current') hwTplmObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6)) hwTplmASGroupTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 11), ) if mibBuilder.loadTexts: hwTplmASGroupTable.setStatus('current') hwTplmASGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 11, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwTplmASGroupIndex")) if mibBuilder.loadTexts: hwTplmASGroupEntry.setStatus('current') hwTplmASGroupIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 11, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 16))) if mibBuilder.loadTexts: hwTplmASGroupIndex.setStatus('current') hwTplmASGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 11, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmASGroupName.setStatus('current') hwTplmASAdminProfileName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 11, 1, 3), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmASAdminProfileName.setStatus('current') hwTplmASGroupProfileStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 11, 1, 4), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmASGroupProfileStatus.setStatus('current') hwTplmASGroupRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 11, 1, 11), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmASGroupRowStatus.setStatus('current') hwTplmASTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 12), ) if mibBuilder.loadTexts: hwTplmASTable.setStatus('current') hwTplmASEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 12, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwTplmASId")) if mibBuilder.loadTexts: hwTplmASEntry.setStatus('current') hwTplmASId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 12, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))) if mibBuilder.loadTexts: hwTplmASId.setStatus('current') hwTplmASASGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 12, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmASASGroupName.setStatus('current') hwTplmASRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 12, 1, 11), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmASRowStatus.setStatus('current') hwTplmPortGroupTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 13), ) if mibBuilder.loadTexts: hwTplmPortGroupTable.setStatus('current') hwTplmPortGroupEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 13, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwTplmPortGroupIndex")) if mibBuilder.loadTexts: hwTplmPortGroupEntry.setStatus('current') hwTplmPortGroupIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 13, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 257))) if mibBuilder.loadTexts: hwTplmPortGroupIndex.setStatus('current') hwTplmPortGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 13, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmPortGroupName.setStatus('current') hwTplmPortGroupType = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 13, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("service", 1), ("ap", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmPortGroupType.setStatus('current') hwTplmPortGroupNetworkBasicProfile = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 13, 1, 4), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmPortGroupNetworkBasicProfile.setStatus('current') hwTplmPortGroupNetworkEnhancedProfile = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 13, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmPortGroupNetworkEnhancedProfile.setStatus('current') hwTplmPortGroupUserAccessProfile = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 13, 1, 6), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmPortGroupUserAccessProfile.setStatus('current') hwTplmPortGroupProfileStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 13, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("enable", 1), ("disable", 2)))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmPortGroupProfileStatus.setStatus('current') hwTplmPortGroupRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 13, 1, 11), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmPortGroupRowStatus.setStatus('current') hwTplmPortTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 14), ) if mibBuilder.loadTexts: hwTplmPortTable.setStatus('current') hwTplmPortEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 14, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwTplmPortIfIndex")) if mibBuilder.loadTexts: hwTplmPortEntry.setStatus('current') hwTplmPortIfIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 14, 1, 1), Integer32()) if mibBuilder.loadTexts: hwTplmPortIfIndex.setStatus('current') hwTplmPortPortGroupName = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 14, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmPortPortGroupName.setStatus('current') hwTplmPortRowStatus = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 14, 1, 11), RowStatus()).setMaxAccess("readcreate") if mibBuilder.loadTexts: hwTplmPortRowStatus.setStatus('current') hwTplmConfigManagement = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 15)) hwTplmConfigCommitAll = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 15, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("commit", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwTplmConfigCommitAll.setStatus('current') hwTplmConfigManagementTable = MibTable((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 15, 2), ) if mibBuilder.loadTexts: hwTplmConfigManagementTable.setStatus('current') hwTplmConfigManagementEntry = MibTableRow((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 15, 2, 1), ).setIndexNames((0, "HUAWEI-UNIMNG-MIB", "hwTplmConfigManagementASId")) if mibBuilder.loadTexts: hwTplmConfigManagementEntry.setStatus('current') hwTplmConfigManagementASId = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 15, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(1, 64))) if mibBuilder.loadTexts: hwTplmConfigManagementASId.setStatus('current') hwTplmConfigManagementCommit = MibTableColumn((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 6, 15, 2, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1))).clone(namedValues=NamedValues(("commit", 1)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: hwTplmConfigManagementCommit.setStatus('current') hwUnimngNotification = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31)) hwTopomngTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 1)) hwTopomngTrapObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 1, 1)) hwTopomngTrapLocalMac = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 1, 1, 1), MacAddress()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwTopomngTrapLocalMac.setStatus('current') hwTopomngTrapLocalPortName = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 1, 1, 2), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwTopomngTrapLocalPortName.setStatus('current') hwTopomngTrapLocalTrunkId = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwTopomngTrapLocalTrunkId.setStatus('current') hwTopomngTrapPeerMac = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 1, 1, 4), MacAddress()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwTopomngTrapPeerMac.setStatus('current') hwTopomngTrapPeerPortName = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 1, 1, 5), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwTopomngTrapPeerPortName.setStatus('current') hwTopomngTrapPeerTrunkId = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwTopomngTrapPeerTrunkId.setStatus('current') hwTopomngTrapReason = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 1, 1, 7), OctetString().subtype(subtypeSpec=ValueSizeConstraint(0, 64))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwTopomngTrapReason.setStatus('current') hwTopomngTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 1, 2)) hwTopomngLinkNormal = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 1, 2, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTopomngTrapLocalMac"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapLocalPortName"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapLocalTrunkId"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapPeerMac"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapPeerPortName"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapPeerTrunkId"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapReason")) if mibBuilder.loadTexts: hwTopomngLinkNormal.setStatus('current') hwTopomngLinkAbnormal = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 1, 2, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTopomngTrapLocalMac"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapLocalPortName"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapLocalTrunkId"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapPeerMac"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapPeerPortName"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapPeerTrunkId"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapReason")) if mibBuilder.loadTexts: hwTopomngLinkAbnormal.setStatus('current') hwAsmngTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2)) hwAsmngTrapObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1)) hwAsmngTrapAsIndex = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 1), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsIndex.setStatus('current') hwAsmngTrapAsModel = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 2), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsModel.setStatus('current') hwAsmngTrapAsSysName = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 3), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsSysName.setStatus('current') hwAsmngTrapAsMac = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 4), MacAddress()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsMac.setStatus('current') hwAsmngTrapAsSn = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 5), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsSn.setStatus('current') hwAsmngTrapAsIfIndex = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 6), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsIfIndex.setStatus('current') hwAsmngTrapAsIfOperStatus = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 7), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsIfOperStatus.setStatus('current') hwAsmngTrapAsFaultTimes = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 8), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsFaultTimes.setStatus('current') hwAsmngTrapAsIfAdminStatus = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 9), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsIfAdminStatus.setStatus('current') hwAsmngTrapAsIfName = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 10), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsIfName.setStatus('current') hwAsmngTrapAsActualeType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 11), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsActualeType.setStatus('current') hwAsmngTrapAsVersion = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 12), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsVersion.setStatus('current') hwAsmngTrapParentVersion = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 13), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapParentVersion.setStatus('current') hwAsmngTrapAddedAsMac = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 14), MacAddress()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAddedAsMac.setStatus('current') hwAsmngTrapAsSlotId = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 15), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsSlotId.setStatus('current') hwAsmngTrapAddedAsSlotType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 16), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAddedAsSlotType.setStatus('current') hwAsmngTrapAsPermitNum = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 17), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsPermitNum.setStatus('current') hwAsmngTrapAsUnimngMode = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 18), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsUnimngMode.setStatus('current') hwAsmngTrapParentUnimngMode = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 19), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapParentUnimngMode.setStatus('current') hwAsmngTrapAsIfType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 20), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsIfType.setStatus('current') hwAsmngTrapAsOnlineFailReasonId = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 21), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsOnlineFailReasonId.setStatus('current') hwAsmngTrapAsOnlineFailReasonDesc = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 1, 22), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwAsmngTrapAsOnlineFailReasonDesc.setStatus('current') hwAsmngTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2)) hwAsFaultNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsMac"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsFaultTimes")) if mibBuilder.loadTexts: hwAsFaultNotify.setStatus('current') hwAsNormalNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsMac")) if mibBuilder.loadTexts: hwAsNormalNotify.setStatus('current') hwAsAddOffLineNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 3)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsMac")) if mibBuilder.loadTexts: hwAsAddOffLineNotify.setStatus('current') hwAsDelOffLineNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 4)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsMac")) if mibBuilder.loadTexts: hwAsDelOffLineNotify.setStatus('current') hwAsPortStateChangeToDownNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 5)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsMac"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfAdminStatus"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfOperStatus")) if mibBuilder.loadTexts: hwAsPortStateChangeToDownNotify.setStatus('current') hwAsPortStateChangeToUpNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 6)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsMac"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfAdminStatus"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfOperStatus")) if mibBuilder.loadTexts: hwAsPortStateChangeToUpNotify.setStatus('current') hwAsModelNotMatchNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 7)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsMac"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsActualeType")) if mibBuilder.loadTexts: hwAsModelNotMatchNotify.setStatus('current') hwAsVersionNotMatchNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 8)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsVersion"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapParentVersion")) if mibBuilder.loadTexts: hwAsVersionNotMatchNotify.setStatus('current') hwAsNameConflictNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 9)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsMac"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAddedAsMac")) if mibBuilder.loadTexts: hwAsNameConflictNotify.setStatus('current') hwAsSlotModelNotMatchNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 10)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSlotId"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAddedAsSlotType")) if mibBuilder.loadTexts: hwAsSlotModelNotMatchNotify.setStatus('current') hwAsFullNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 11)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsMac"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsPermitNum")) if mibBuilder.loadTexts: hwAsFullNotify.setStatus('current') hwUnimngModeNotMatchNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 12)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsMac"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsUnimngMode"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapParentUnimngMode")) if mibBuilder.loadTexts: hwUnimngModeNotMatchNotify.setStatus('current') hwAsBoardAddNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 13)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSlotId")) if mibBuilder.loadTexts: hwAsBoardAddNotify.setStatus('current') hwAsBoardDeleteNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 14)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSlotId")) if mibBuilder.loadTexts: hwAsBoardDeleteNotify.setStatus('current') hwAsBoardPlugInNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 15)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSlotId")) if mibBuilder.loadTexts: hwAsBoardPlugInNotify.setStatus('current') hwAsBoardPlugOutNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 16)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSlotId")) if mibBuilder.loadTexts: hwAsBoardPlugOutNotify.setStatus('current') hwAsInBlacklistNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 17)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsMac")) if mibBuilder.loadTexts: hwAsInBlacklistNotify.setStatus('current') hwAsUnconfirmedNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 18)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsMac")) if mibBuilder.loadTexts: hwAsUnconfirmedNotify.setStatus('current') hwAsComboPortTypeChangeNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 19)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfType")) if mibBuilder.loadTexts: hwAsComboPortTypeChangeNotify.setStatus('current') hwAsOnlineFailNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 20)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsMac"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsOnlineFailReasonId"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsOnlineFailReasonDesc")) if mibBuilder.loadTexts: hwAsOnlineFailNotify.setStatus('current') hwAsSlotIdInvalidNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 21)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSlotId")) if mibBuilder.loadTexts: hwAsSlotIdInvalidNotify.setStatus('current') hwAsSysmacSwitchCfgErrNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 2, 2, 22)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName")) if mibBuilder.loadTexts: hwAsSysmacSwitchCfgErrNotify.setStatus('current') hwUniMbrTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3)) hwUniMbrTrapObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 1)) hwUniMbrLinkStatTrapLocalMac = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 1, 1), MacAddress()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniMbrLinkStatTrapLocalMac.setStatus('current') hwUniMbrLinkStatTrapLocalPortName = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 1, 2), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniMbrLinkStatTrapLocalPortName.setStatus('current') hwUniMbrLinkStatTrapChangeType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 1, 3), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("up2down", 1), ("down2up", 2)))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniMbrLinkStatTrapChangeType.setStatus('current') hwUniMbrTrapConnectErrorReason = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 1, 4), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniMbrTrapConnectErrorReason.setStatus('current') hwUniMbrTrapReceivePktRate = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 1, 5), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniMbrTrapReceivePktRate.setStatus('current') hwUniMbrTrapAsIndex = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 1, 6), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniMbrTrapAsIndex.setStatus('current') hwUniMbrTrapAsSysName = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 1, 7), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniMbrTrapAsSysName.setStatus('current') hwUniMbrParaSynFailReason = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 1, 8), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniMbrParaSynFailReason.setStatus('current') hwUniMbrTrapIllegalConfigReason = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 1, 9), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniMbrTrapIllegalConfigReason.setStatus('current') hwUniMbrTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 2)) hwUniMbrConnectError = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 2, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniMbrTrapConnectErrorReason")) if mibBuilder.loadTexts: hwUniMbrConnectError.setStatus('current') hwUniMbrASDiscoverAttack = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 2, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniMbrTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrLinkStatTrapLocalPortName"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrTrapReceivePktRate")) if mibBuilder.loadTexts: hwUniMbrASDiscoverAttack.setStatus('current') hwUniMbrFabricPortMemberDelete = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 2, 3)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniMbrTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrLinkStatTrapLocalPortName")) if mibBuilder.loadTexts: hwUniMbrFabricPortMemberDelete.setStatus('current') hwUniMbrIllegalFabricConfig = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 3, 2, 4)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniMbrTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrTrapIllegalConfigReason")) if mibBuilder.loadTexts: hwUniMbrIllegalFabricConfig.setStatus('current') hwVermngTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 4)) hwVermngTrapObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 4, 1)) hwVermngTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 4, 2)) hwVermngUpgradeFail = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 4, 2, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsErrorCode"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsErrorDescr")) if mibBuilder.loadTexts: hwVermngUpgradeFail.setStatus('current') hwTplmTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 5)) hwTplmTrapObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 5, 1)) hwTplmTrapASName = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 5, 1, 1), OctetString().subtype(subtypeSpec=ValueSizeConstraint(1, 31))).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwTplmTrapASName.setStatus('current') hwTplmTrapFailedReason = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 5, 1, 2), OctetString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwTplmTrapFailedReason.setStatus('current') hwTplmTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 5, 2)) hwTplmCmdExecuteFailedNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 5, 2, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTplmTrapASName"), ("HUAWEI-UNIMNG-MIB", "hwTplmTrapFailedReason")) if mibBuilder.loadTexts: hwTplmCmdExecuteFailedNotify.setStatus('current') hwTplmCmdExecuteSuccessfulNotify = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 5, 2, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTplmTrapASName")) if mibBuilder.loadTexts: hwTplmCmdExecuteSuccessfulNotify.setStatus('current') hwTplmDirectCmdRecoverFail = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 5, 2, 3)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTplmTrapASName")) if mibBuilder.loadTexts: hwTplmDirectCmdRecoverFail.setStatus('current') hwUniAsBaseTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6)) hwUniAsBaseTrapObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1)) hwUniAsBaseAsName = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 1), DisplayString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseAsName.setStatus('current') hwUniAsBaseAsId = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 2), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseAsId.setStatus('current') hwUniAsBaseEntityPhysicalIndex = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 3), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseEntityPhysicalIndex.setStatus('current') hwUniAsBaseTrapSeverity = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 4), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseTrapSeverity.setStatus('current') hwUniAsBaseTrapProbableCause = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 5), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseTrapProbableCause.setStatus('current') hwUniAsBaseTrapEventType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 6), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseTrapEventType.setStatus('current') hwUniAsBaseEntPhysicalContainedIn = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 7), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseEntPhysicalContainedIn.setStatus('current') hwUniAsBaseEntPhysicalName = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 8), DisplayString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseEntPhysicalName.setStatus('current') hwUniAsBaseRelativeResource = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 9), DisplayString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseRelativeResource.setStatus('current') hwUniAsBaseReasonDescription = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 10), DisplayString()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseReasonDescription.setStatus('current') hwUniAsBaseThresholdType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 11), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseThresholdType.setStatus('current') hwUniAsBaseThresholdValue = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 12), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseThresholdValue.setStatus('current') hwUniAsBaseThresholdUnit = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 13), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseThresholdUnit.setStatus('current') hwUniAsBaseThresholdHighWarning = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 14), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseThresholdHighWarning.setStatus('current') hwUniAsBaseThresholdHighCritical = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 15), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseThresholdHighCritical.setStatus('current') hwUniAsBaseThresholdLowWarning = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 16), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseThresholdLowWarning.setStatus('current') hwUniAsBaseThresholdLowCritical = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 17), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseThresholdLowCritical.setStatus('current') hwUniAsBaseEntityTrapEntType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 18), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseEntityTrapEntType.setStatus('current') hwUniAsBaseEntityTrapEntFaultID = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 19), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseEntityTrapEntFaultID.setStatus('current') hwUniAsBaseEntityTrapCommunicateType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 20), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseEntityTrapCommunicateType.setStatus('current') hwUniAsBaseThresholdEntValue = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 21), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseThresholdEntValue.setStatus('current') hwUniAsBaseThresholdEntCurrent = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 22), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseThresholdEntCurrent.setStatus('current') hwUniAsBaseEntPhysicalIndex = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 23), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseEntPhysicalIndex.setStatus('current') hwUniAsBaseThresholdHwBaseThresholdType = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 24), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseThresholdHwBaseThresholdType.setStatus('current') hwUniAsBaseThresholdHwBaseThresholdIndex = MibScalar((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 1, 25), Integer32()).setMaxAccess("accessiblefornotify") if mibBuilder.loadTexts: hwUniAsBaseThresholdHwBaseThresholdIndex.setStatus('current') hwUniAsBaseTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2)) hwASEnvironmentTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 2)) hwASBrdTempAlarm = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 2, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdEntValue"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdEntCurrent"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASBrdTempAlarm.setStatus('current') hwASBrdTempResume = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 2, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdEntValue"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdEntCurrent"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASBrdTempResume.setStatus('current') hwASBoardTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 3)) hwASBoardFail = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 3, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASBoardFail.setStatus('current') hwASBoardFailResume = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 3, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASBoardFailResume.setStatus('current') hwASOpticalTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 4)) hwASOpticalInvalid = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 4, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASOpticalInvalid.setStatus('current') hwASOpticalInvalidResume = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 4, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASOpticalInvalidResume.setStatus('current') hwASPowerTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 5)) hwASPowerRemove = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 5, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASPowerRemove.setStatus('current') hwASPowerInsert = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 5, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASPowerInsert.setStatus('current') hwASPowerInvalid = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 5, 3)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASPowerInvalid.setStatus('current') hwASPowerInvalidResume = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 5, 4)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASPowerInvalidResume.setStatus('current') hwASFanTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 6)) hwASFanRemove = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 6, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASFanRemove.setStatus('current') hwASFanInsert = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 6, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASFanInsert.setStatus('current') hwASFanInvalid = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 6, 3)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASFanInvalid.setStatus('current') hwASFanInvalidResume = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 6, 4)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASFanInvalidResume.setStatus('current') hwASCommunicateTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 7)) hwASCommunicateError = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 7, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapCommunicateType")) if mibBuilder.loadTexts: hwASCommunicateError.setStatus('current') hwASCommunicateResume = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 7, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapCommunicateType")) if mibBuilder.loadTexts: hwASCommunicateResume.setStatus('current') hwASCPUTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 8)) hwASCPUUtilizationRising = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 8, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdEntValue"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdEntCurrent"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASCPUUtilizationRising.setStatus('current') hwASCPUUtilizationResume = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 8, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdEntValue"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdEntCurrent"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASCPUUtilizationResume.setStatus('current') hwASMemoryTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 9)) hwASMemUtilizationRising = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 9, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdEntValue"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdEntCurrent"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASMemUtilizationRising.setStatus('current') hwASMemUtilizationResume = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 9, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdEntValue"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdEntCurrent"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID")) if mibBuilder.loadTexts: hwASMemUtilizationResume.setStatus('current') hwASMadTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 10)) hwASMadConflictDetect = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 10, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId")) if mibBuilder.loadTexts: hwASMadConflictDetect.setStatus('current') hwASMadConflictResume = NotificationType((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 31, 6, 2, 10, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId")) if mibBuilder.loadTexts: hwASMadConflictResume.setStatus('current') hwUnimngConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50)) hwTopomngCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 1)) hwTopomngCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 1, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTopomngObjectsGroup"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTopoGroup"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapObjectsGroup"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwTopomngCompliance = hwTopomngCompliance.setStatus('current') hwTopomngObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 1, 1, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTopomngExploreTime"), ("HUAWEI-UNIMNG-MIB", "hwTopomngLastCollectDuration")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwTopomngObjectsGroup = hwTopomngObjectsGroup.setStatus('current') hwTopomngTopoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 1, 1, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTopoPeerMac"), ("HUAWEI-UNIMNG-MIB", "hwTopoLocalPortName"), ("HUAWEI-UNIMNG-MIB", "hwTopoPeerPortName"), ("HUAWEI-UNIMNG-MIB", "hwTopoLocalTrunkId"), ("HUAWEI-UNIMNG-MIB", "hwTopoPeerTrunkId"), ("HUAWEI-UNIMNG-MIB", "hwTopoLocalRole"), ("HUAWEI-UNIMNG-MIB", "hwTopoPeerRole")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwTopomngTopoGroup = hwTopomngTopoGroup.setStatus('current') hwTopomngTrapObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 1, 1, 3)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTopomngTrapLocalMac"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapLocalPortName"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapLocalTrunkId"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapPeerMac"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapPeerPortName"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapPeerTrunkId"), ("HUAWEI-UNIMNG-MIB", "hwTopomngTrapReason")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwTopomngTrapObjectsGroup = hwTopomngTrapObjectsGroup.setStatus('current') hwTopomngTrapsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 1, 1, 4)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTopomngLinkNormal"), ("HUAWEI-UNIMNG-MIB", "hwTopomngLinkAbnormal")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwTopomngTrapsGroup = hwTopomngTrapsGroup.setStatus('current') hwAsmngCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2)) hwAsmngCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngObjectsGroup"), ("HUAWEI-UNIMNG-MIB", "hwAsmngAsGroup"), ("HUAWEI-UNIMNG-MIB", "hwAsmngAsIfGroup"), ("HUAWEI-UNIMNG-MIB", "hwAsmngAsIfXGroup"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapObjectsGroup"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapsGroup"), ("HUAWEI-UNIMNG-MIB", "hwAsmngGlobalObjectsGroup"), ("HUAWEI-UNIMNG-MIB", "hwAsmngMacWhitelistGroup"), ("HUAWEI-UNIMNG-MIB", "hwAsmngMacBlacklistGroup"), ("HUAWEI-UNIMNG-MIB", "hwAsmngEntityPhysicalGroup"), ("HUAWEI-UNIMNG-MIB", "hwAsmngEntityStateGroup"), ("HUAWEI-UNIMNG-MIB", "hwAsmngEntityAliasMappingGroup"), ("HUAWEI-UNIMNG-MIB", "hwAsmngSlotGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwAsmngCompliance = hwAsmngCompliance.setStatus('current') hwAsmngObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2, 1, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniMngEnable")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwAsmngObjectsGroup = hwAsmngObjectsGroup.setStatus('current') hwAsmngAsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2, 1, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsHardwareVersion"), ("HUAWEI-UNIMNG-MIB", "hwAsIpAddress"), ("HUAWEI-UNIMNG-MIB", "hwAsIpNetMask"), ("HUAWEI-UNIMNG-MIB", "hwAsAccessUser"), ("HUAWEI-UNIMNG-MIB", "hwAsMac"), ("HUAWEI-UNIMNG-MIB", "hwAsSn"), ("HUAWEI-UNIMNG-MIB", "hwAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsRunState"), ("HUAWEI-UNIMNG-MIB", "hwAsSoftwareVersion"), ("HUAWEI-UNIMNG-MIB", "hwAsDns"), ("HUAWEI-UNIMNG-MIB", "hwAsOnlineTime"), ("HUAWEI-UNIMNG-MIB", "hwAsCpuUseage"), ("HUAWEI-UNIMNG-MIB", "hwAsMemoryUseage"), ("HUAWEI-UNIMNG-MIB", "hwAsSysMac"), ("HUAWEI-UNIMNG-MIB", "hwAsStackEnable"), ("HUAWEI-UNIMNG-MIB", "hwAsGatewayIp"), ("HUAWEI-UNIMNG-MIB", "hwAsRowstatus"), ("HUAWEI-UNIMNG-MIB", "hwAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsVpnInstance")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwAsmngAsGroup = hwAsmngAsGroup.setStatus('current') hwAsmngAsIfGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2, 1, 3)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsIfDescr"), ("HUAWEI-UNIMNG-MIB", "hwAsIfType"), ("HUAWEI-UNIMNG-MIB", "hwAsIfMtu"), ("HUAWEI-UNIMNG-MIB", "hwAsIfSpeed"), ("HUAWEI-UNIMNG-MIB", "hwAsIfPhysAddress"), ("HUAWEI-UNIMNG-MIB", "hwAsIfAdminStatus"), ("HUAWEI-UNIMNG-MIB", "hwAsIfInUcastPkts"), ("HUAWEI-UNIMNG-MIB", "hwAsIfOutUcastPkts"), ("HUAWEI-UNIMNG-MIB", "hwAsIfOperStatus"), ("HUAWEI-UNIMNG-MIB", "hwAsIfIndex")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwAsmngAsIfGroup = hwAsmngAsIfGroup.setStatus('current') hwAsmngAsIfXGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2, 1, 4)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsIfLinkUpDownTrapEnable"), ("HUAWEI-UNIMNG-MIB", "hwAsIfHighSpeed"), ("HUAWEI-UNIMNG-MIB", "hwAsIfAlias"), ("HUAWEI-UNIMNG-MIB", "hwAsIfInUcastPkts"), ("HUAWEI-UNIMNG-MIB", "hwAsIfOutUcastPkts"), ("HUAWEI-UNIMNG-MIB", "hwAsIfHCOutOctets"), ("HUAWEI-UNIMNG-MIB", "hwAsIfInMulticastPkts"), ("HUAWEI-UNIMNG-MIB", "hwAsIfInBroadcastPkts"), ("HUAWEI-UNIMNG-MIB", "hwAsIfOutMulticastPkts"), ("HUAWEI-UNIMNG-MIB", "hwAsIfOutBroadcastPkts"), ("HUAWEI-UNIMNG-MIB", "hwAsIfHCInOctets"), ("HUAWEI-UNIMNG-MIB", "hwAsIfAsId"), ("HUAWEI-UNIMNG-MIB", "hwAsIfName")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwAsmngAsIfXGroup = hwAsmngAsIfXGroup.setStatus('current') hwAsmngTrapObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2, 1, 5)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsModel"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsMac"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSn"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfIndex"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfOperStatus"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsFaultTimes"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfAdminStatus"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfName"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsActualeType"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsVersion"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapParentVersion"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAddedAsMac"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsSlotId"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAddedAsSlotType"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsPermitNum"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsUnimngMode"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapParentUnimngMode"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsIfType"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsOnlineFailReasonId"), ("HUAWEI-UNIMNG-MIB", "hwAsmngTrapAsOnlineFailReasonDesc")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwAsmngTrapObjectsGroup = hwAsmngTrapObjectsGroup.setStatus('current') hwAsmngTrapsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2, 1, 6)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsFaultNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsNormalNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsAddOffLineNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsDelOffLineNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsPortStateChangeToDownNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsPortStateChangeToUpNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsModelNotMatchNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsVersionNotMatchNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsNameConflictNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsSlotModelNotMatchNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsFullNotify"), ("HUAWEI-UNIMNG-MIB", "hwUnimngModeNotMatchNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsBoardAddNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsBoardDeleteNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsBoardPlugInNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsBoardPlugOutNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsInBlacklistNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsUnconfirmedNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsComboPortTypeChangeNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsOnlineFailNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsSlotIdInvalidNotify"), ("HUAWEI-UNIMNG-MIB", "hwAsSysmacSwitchCfgErrNotify")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwAsmngTrapsGroup = hwAsmngTrapsGroup.setStatus('current') hwAsmngGlobalObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2, 1, 7)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsAutoReplaceEnable"), ("HUAWEI-UNIMNG-MIB", "hwAsAuthMode")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwAsmngGlobalObjectsGroup = hwAsmngGlobalObjectsGroup.setStatus('current') hwAsmngMacWhitelistGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2, 1, 8)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsMacWhitelistRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwAsmngMacWhitelistGroup = hwAsmngMacWhitelistGroup.setStatus('current') hwAsmngMacBlacklistGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2, 1, 9)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsMacBlacklistRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwAsmngMacBlacklistGroup = hwAsmngMacBlacklistGroup.setStatus('current') hwAsmngEntityPhysicalGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2, 1, 10)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsEntityPhysicalDescr"), ("HUAWEI-UNIMNG-MIB", "hwAsEntityPhysicalVendorType"), ("HUAWEI-UNIMNG-MIB", "hwAsEntityPhysicalContainedIn"), ("HUAWEI-UNIMNG-MIB", "hwAsEntityPhysicalClass"), ("HUAWEI-UNIMNG-MIB", "hwAsEntityPhysicalParentRelPos"), ("HUAWEI-UNIMNG-MIB", "hwAsEntityPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwAsEntityPhysicalHardwareRev"), ("HUAWEI-UNIMNG-MIB", "hwAsEntityPhysicalFirmwareRev"), ("HUAWEI-UNIMNG-MIB", "hwAsEntityPhysicalSoftwareRev"), ("HUAWEI-UNIMNG-MIB", "hwAsEntityPhysicalSerialNum"), ("HUAWEI-UNIMNG-MIB", "hwAsEntityPhysicalMfgName")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwAsmngEntityPhysicalGroup = hwAsmngEntityPhysicalGroup.setStatus('current') hwAsmngEntityStateGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2, 1, 11)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsEntityAdminStatus"), ("HUAWEI-UNIMNG-MIB", "hwAsEntityOperStatus"), ("HUAWEI-UNIMNG-MIB", "hwAsEntityStandbyStatus"), ("HUAWEI-UNIMNG-MIB", "hwAsEntityAlarmLight"), ("HUAWEI-UNIMNG-MIB", "hwAsEntityPortType")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwAsmngEntityStateGroup = hwAsmngEntityStateGroup.setStatus('current') hwAsmngEntityAliasMappingGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2, 1, 12)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsEntryAliasMappingIdentifier")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwAsmngEntityAliasMappingGroup = hwAsmngEntityAliasMappingGroup.setStatus('current') hwAsmngSlotGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 2, 1, 13)).setObjects(("HUAWEI-UNIMNG-MIB", "hwAsSlotState"), ("HUAWEI-UNIMNG-MIB", "hwAsSlotRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwAsmngSlotGroup = hwAsmngSlotGroup.setStatus('current') hwMbrCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 3)) hwMbrCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 3, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwMbrTrapObjectsGroup"), ("HUAWEI-UNIMNG-MIB", "hwMbrTrapsGroup"), ("HUAWEI-UNIMNG-MIB", "hwMbrFabricPortGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwMbrCompliance = hwMbrCompliance.setStatus('current') hwMbrTrapObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 3, 1, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniMbrLinkStatTrapLocalMac"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrLinkStatTrapLocalPortName"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrLinkStatTrapChangeType"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrTrapConnectErrorReason"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrTrapReceivePktRate"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrTrapAsIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrTrapAsSysName"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrParaSynFailReason"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrTrapIllegalConfigReason")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwMbrTrapObjectsGroup = hwMbrTrapObjectsGroup.setStatus('current') hwMbrTrapsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 3, 1, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniMbrConnectError"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrASDiscoverAttack"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrFabricPortMemberDelete"), ("HUAWEI-UNIMNG-MIB", "hwUniMbrIllegalFabricConfig")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwMbrTrapsGroup = hwMbrTrapsGroup.setStatus('current') hwMbrFabricPortGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 3, 1, 3)).setObjects(("HUAWEI-UNIMNG-MIB", "hwMbrMngFabricPortMemberIfName"), ("HUAWEI-UNIMNG-MIB", "hwMbrMngFabricPortDirection"), ("HUAWEI-UNIMNG-MIB", "hwMbrMngFabricPortIndirectFlag"), ("HUAWEI-UNIMNG-MIB", "hwMbrMngFabricPortDescription")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwMbrFabricPortGroup = hwMbrFabricPortGroup.setStatus('current') hwVermngCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 4)) hwVermngCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 4, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwVermngObjectsGroup"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoGroup"), ("HUAWEI-UNIMNG-MIB", "hwVermngAsTypeCfgInfoGroup"), ("HUAWEI-UNIMNG-MIB", "hwVermngTrapsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwVermngCompliance = hwVermngCompliance.setStatus('current') hwVermngObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 4, 1, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwVermngFileServerType")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwVermngObjectsGroup = hwVermngObjectsGroup.setStatus('current') hwVermngUpgradeInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 4, 1, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsName"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsSysSoftware"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsSysSoftwareVer"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsSysPatch"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsDownloadSoftware"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsDownloadSoftwareVer"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsDownloadPatch"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsUpgradeState"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsUpgradeType"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsFilePhase"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsUpgradePhase"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsUpgradeResult"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsErrorCode"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoAsErrorDescr")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwVermngUpgradeInfoGroup = hwVermngUpgradeInfoGroup.setStatus('current') hwVermngAsTypeCfgInfoGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 4, 1, 3)).setObjects(("HUAWEI-UNIMNG-MIB", "hwVermngAsTypeCfgInfoPatch"), ("HUAWEI-UNIMNG-MIB", "hwVermngAsTypeCfgInfoSystemSoftwareVer"), ("HUAWEI-UNIMNG-MIB", "hwVermngAsTypeCfgInfoRowStatus"), ("HUAWEI-UNIMNG-MIB", "hwVermngAsTypeCfgInfoSystemSoftware"), ("HUAWEI-UNIMNG-MIB", "hwVermngAsTypeCfgInfoAsTypeName")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwVermngAsTypeCfgInfoGroup = hwVermngAsTypeCfgInfoGroup.setStatus('current') hwVermngTrapsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 4, 1, 4)).setObjects(("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeFail")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwVermngTrapsGroup = hwVermngTrapsGroup.setStatus('current') hwTplmCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 5)) hwTplmCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 5, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwVermngObjectsGroup"), ("HUAWEI-UNIMNG-MIB", "hwVermngUpgradeInfoGroup"), ("HUAWEI-UNIMNG-MIB", "hwVermngAsTypeCfgInfoGroup"), ("HUAWEI-UNIMNG-MIB", "hwVermngTrapsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwTplmCompliance = hwTplmCompliance.setStatus('current') hwTplmASGroupGoup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 5, 1, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTplmASGroupName"), ("HUAWEI-UNIMNG-MIB", "hwTplmASAdminProfileName"), ("HUAWEI-UNIMNG-MIB", "hwTplmASGroupProfileStatus"), ("HUAWEI-UNIMNG-MIB", "hwTplmASGroupRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwTplmASGroupGoup = hwTplmASGroupGoup.setStatus('current') hwTplmASGoup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 5, 1, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTplmASASGroupName"), ("HUAWEI-UNIMNG-MIB", "hwTplmASRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwTplmASGoup = hwTplmASGoup.setStatus('current') hwTplmPortGroupGoup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 5, 1, 3)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTplmPortGroupName"), ("HUAWEI-UNIMNG-MIB", "hwTplmPortGroupType"), ("HUAWEI-UNIMNG-MIB", "hwTplmPortGroupNetworkBasicProfile"), ("HUAWEI-UNIMNG-MIB", "hwTplmPortGroupNetworkEnhancedProfile"), ("HUAWEI-UNIMNG-MIB", "hwTplmPortGroupUserAccessProfile"), ("HUAWEI-UNIMNG-MIB", "hwTplmPortGroupProfileStatus"), ("HUAWEI-UNIMNG-MIB", "hwTplmPortGroupRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwTplmPortGroupGoup = hwTplmPortGroupGoup.setStatus('current') hwTplmPortGoup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 5, 1, 4)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTplmPortPortGroupName"), ("HUAWEI-UNIMNG-MIB", "hwTplmPortRowStatus")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwTplmPortGoup = hwTplmPortGoup.setStatus('current') hwTplmConfigManagementGoup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 5, 1, 5)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTplmConfigCommitAll"), ("HUAWEI-UNIMNG-MIB", "hwTplmConfigManagementCommit")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwTplmConfigManagementGoup = hwTplmConfigManagementGoup.setStatus('current') hwTplmTrapObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 5, 1, 6)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTplmTrapASName"), ("HUAWEI-UNIMNG-MIB", "hwTplmTrapFailedReason")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwTplmTrapObjectsGroup = hwTplmTrapObjectsGroup.setStatus('current') hwTplmTrapsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 5, 1, 7)).setObjects(("HUAWEI-UNIMNG-MIB", "hwTplmCmdExecuteFailedNotify"), ("HUAWEI-UNIMNG-MIB", "hwTplmCmdExecuteSuccessfulNotify"), ("HUAWEI-UNIMNG-MIB", "hwTplmDirectCmdRecoverFail")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwTplmTrapsGroup = hwTplmTrapsGroup.setStatus('current') hwUniBaseTrapCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 6)) hwUniBaseTrapCompliance = ModuleCompliance((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 6, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniBaseTrapObjectsGroup"), ("HUAWEI-UNIMNG-MIB", "hwUniBaseTrapsGroup")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwUniBaseTrapCompliance = hwUniBaseTrapCompliance.setStatus('current') hwUniBaseTrapObjectsGroup = ObjectGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 6, 1, 1)).setObjects(("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseAsId"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseTrapSeverity"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseTrapProbableCause"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseTrapEventType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalContainedIn"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalName"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseRelativeResource"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseReasonDescription"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdValue"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdUnit"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdHighWarning"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdHighCritical"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdLowWarning"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdLowCritical"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapEntFaultID"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntityTrapCommunicateType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdEntValue"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdEntCurrent"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseEntPhysicalIndex"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdHwBaseThresholdType"), ("HUAWEI-UNIMNG-MIB", "hwUniAsBaseThresholdHwBaseThresholdIndex")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwUniBaseTrapObjectsGroup = hwUniBaseTrapObjectsGroup.setStatus('current') hwUniBaseTrapsGroup = NotificationGroup((1, 3, 6, 1, 4, 1, 2011, 5, 25, 327, 50, 6, 1, 2)).setObjects(("HUAWEI-UNIMNG-MIB", "hwASBoardFail"), ("HUAWEI-UNIMNG-MIB", "hwASBoardFailResume"), ("HUAWEI-UNIMNG-MIB", "hwASOpticalInvalid"), ("HUAWEI-UNIMNG-MIB", "hwASOpticalInvalidResume"), ("HUAWEI-UNIMNG-MIB", "hwASPowerRemove"), ("HUAWEI-UNIMNG-MIB", "hwASPowerInsert"), ("HUAWEI-UNIMNG-MIB", "hwASPowerInvalid"), ("HUAWEI-UNIMNG-MIB", "hwASPowerInvalidResume"), ("HUAWEI-UNIMNG-MIB", "hwASFanRemove"), ("HUAWEI-UNIMNG-MIB", "hwASFanInsert"), ("HUAWEI-UNIMNG-MIB", "hwASFanInvalid"), ("HUAWEI-UNIMNG-MIB", "hwASFanInvalidResume"), ("HUAWEI-UNIMNG-MIB", "hwASCommunicateError"), ("HUAWEI-UNIMNG-MIB", "hwASCommunicateResume"), ("HUAWEI-UNIMNG-MIB", "hwASCPUUtilizationRising"), ("HUAWEI-UNIMNG-MIB", "hwASCPUUtilizationResume"), ("HUAWEI-UNIMNG-MIB", "hwASMemUtilizationRising"), ("HUAWEI-UNIMNG-MIB", "hwASMemUtilizationResume"), ("HUAWEI-UNIMNG-MIB", "hwASMadConflictDetect"), ("HUAWEI-UNIMNG-MIB", "hwASMadConflictResume"), ("HUAWEI-UNIMNG-MIB", "hwASBrdTempAlarm"), ("HUAWEI-UNIMNG-MIB", "hwASBrdTempResume")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): hwUniBaseTrapsGroup = hwUniBaseTrapsGroup.setStatus('current') mibBuilder.exportSymbols("HUAWEI-UNIMNG-MIB", hwAsFaultNotify=hwAsFaultNotify, hwTplmCmdExecuteSuccessfulNotify=hwTplmCmdExecuteSuccessfulNotify, hwAsSysName=hwAsSysName, hwAsEntityStandbyStatus=hwAsEntityStandbyStatus, hwAsmngTrapAsSysName=hwAsmngTrapAsSysName, hwAsTable=hwAsTable, hwVermngCompliance=hwVermngCompliance, hwAsPortStateChangeToUpNotify=hwAsPortStateChangeToUpNotify, hwTopomngTrap=hwTopomngTrap, hwAsmngTrapAsPermitNum=hwAsmngTrapAsPermitNum, hwTopomngTrapLocalPortName=hwTopomngTrapLocalPortName, hwTplmPortGroupNetworkBasicProfile=hwTplmPortGroupNetworkBasicProfile, hwAsIfMtu=hwAsIfMtu, hwTopoLocalPortName=hwTopoLocalPortName, hwUniAsBaseThresholdUnit=hwUniAsBaseThresholdUnit, hwAsmngTrapAsModel=hwAsmngTrapAsModel, hwTopomngTopoEntry=hwTopomngTopoEntry, hwTopoPeerTrunkId=hwTopoPeerTrunkId, hwVermngAsTypeCfgInfoSystemSoftware=hwVermngAsTypeCfgInfoSystemSoftware, hwAsmngTrapAsOnlineFailReasonId=hwAsmngTrapAsOnlineFailReasonId, hwUniMbrTrapReceivePktRate=hwUniMbrTrapReceivePktRate, hwASBrdTempResume=hwASBrdTempResume, hwAsMemoryUseage=hwAsMemoryUseage, hwAsSlotEntry=hwAsSlotEntry, hwAsMacBlacklistRowStatus=hwAsMacBlacklistRowStatus, hwVermngCompliances=hwVermngCompliances, hwMbrMngASId=hwMbrMngASId, hwTopomngTopoTable=hwTopomngTopoTable, hwAsmngAsGroup=hwAsmngAsGroup, hwASMadTrap=hwASMadTrap, hwVermngUpgradeInfoAsDownloadSoftwareVer=hwVermngUpgradeInfoAsDownloadSoftwareVer, hwUniAsBaseTrap=hwUniAsBaseTrap, hwVermngUpgradeInfoAsSysPatch=hwVermngUpgradeInfoAsSysPatch, hwTplmPortGroupIndex=hwTplmPortGroupIndex, hwAsEntityStateTable=hwAsEntityStateTable, hwUniMbrParaSynFailReason=hwUniMbrParaSynFailReason, hwTplmASGroupTable=hwTplmASGroupTable, hwTplmPortGroupGoup=hwTplmPortGroupGoup, hwASCommunicateResume=hwASCommunicateResume, hwAsmngTrapAsIfOperStatus=hwAsmngTrapAsIfOperStatus, hwVermngUpgradeInfoAsName=hwVermngUpgradeInfoAsName, hwUniAsBaseEntityTrapEntType=hwUniAsBaseEntityTrapEntType, hwUniAsBaseEntPhysicalName=hwUniAsBaseEntPhysicalName, hwTopoPeerPortName=hwTopoPeerPortName, hwUniAsBaseThresholdValue=hwUniAsBaseThresholdValue, hwAsMacBlacklistMacAddr=hwAsMacBlacklistMacAddr, hwUniAsBaseEntityTrapEntFaultID=hwUniAsBaseEntityTrapEntFaultID, hwASCPUUtilizationResume=hwASCPUUtilizationResume, hwAsmngAsIfGroup=hwAsmngAsIfGroup, hwTplmTrapsGroup=hwTplmTrapsGroup, hwTplmTrapFailedReason=hwTplmTrapFailedReason, hwUniMbrLinkStatTrapLocalMac=hwUniMbrLinkStatTrapLocalMac, hwTplmASEntry=hwTplmASEntry, hwTopoPeerMac=hwTopoPeerMac, hwTplmPortEntry=hwTplmPortEntry, hwAsmngObjectsGroup=hwAsmngObjectsGroup, hwAsIfOutBroadcastPkts=hwAsIfOutBroadcastPkts, hwTopomngObjectsGroup=hwTopomngObjectsGroup, hwVermngAsTypeCfgInfoTable=hwVermngAsTypeCfgInfoTable, hwUniAsBaseThresholdHighWarning=hwUniAsBaseThresholdHighWarning, hwAsEntityPhysicalName=hwAsEntityPhysicalName, hwTplmPortGoup=hwTplmPortGoup, hwVermngObjectsGroup=hwVermngObjectsGroup, hwVermngUpgradeInfoAsUpgradePhase=hwVermngUpgradeInfoAsUpgradePhase, hwAsIfEntry=hwAsIfEntry, hwTplmASAdminProfileName=hwTplmASAdminProfileName, hwTopomngTraps=hwTopomngTraps, hwAsSysMac=hwAsSysMac, hwAsIfPhysAddress=hwAsIfPhysAddress, hwAsGatewayIp=hwAsGatewayIp, hwVermngUpgradeInfoTable=hwVermngUpgradeInfoTable, hwAsDns=hwAsDns, hwAsStackEnable=hwAsStackEnable, hwASFanTrap=hwASFanTrap, hwTplmConfigCommitAll=hwTplmConfigCommitAll, hwAsmngMacBlacklistGroup=hwAsmngMacBlacklistGroup, hwTplmPortGroupUserAccessProfile=hwTplmPortGroupUserAccessProfile, hwTopomngTopoGroup=hwTopomngTopoGroup, hwAsIfXTable=hwAsIfXTable, hwAsmngTrapObjects=hwAsmngTrapObjects, hwAsmngCompliance=hwAsmngCompliance, hwUniBaseTrapCompliance=hwUniBaseTrapCompliance, hwAsMacBlacklistEntry=hwAsMacBlacklistEntry, hwTopomngTrapsGroup=hwTopomngTrapsGroup, hwTopomngLinkAbnormal=hwTopomngLinkAbnormal, hwVermngUpgradeInfoEntry=hwVermngUpgradeInfoEntry, hwUniMngEnable=hwUniMngEnable, hwTopoLocalMac=hwTopoLocalMac, hwASMemUtilizationRising=hwASMemUtilizationRising, hwAsIndex=hwAsIndex, hwAsEntityStateEntry=hwAsEntityStateEntry, hwUniMbrLinkStatTrapChangeType=hwUniMbrLinkStatTrapChangeType, hwAsEntry=hwAsEntry, hwAsmngTrapsGroup=hwAsmngTrapsGroup, hwAsmngTrapAsSn=hwAsmngTrapAsSn, hwTplmPortGroupTable=hwTplmPortGroupTable, hwUniMbrTrapConnectErrorReason=hwUniMbrTrapConnectErrorReason, hwVermngUpgradeInfoGroup=hwVermngUpgradeInfoGroup, hwTplmCompliance=hwTplmCompliance, hwUniAsBaseRelativeResource=hwUniAsBaseRelativeResource, hwAsEntityPhysicalDescr=hwAsEntityPhysicalDescr, hwAsHardwareVersion=hwAsHardwareVersion, hwAsSoftwareVersion=hwAsSoftwareVersion, hwAsIfOutMulticastPkts=hwAsIfOutMulticastPkts, hwTplmDirectCmdRecoverFail=hwTplmDirectCmdRecoverFail, hwAsMacWhitelistTable=hwAsMacWhitelistTable, hwTopomngLastCollectDuration=hwTopomngLastCollectDuration, hwVermngTrap=hwVermngTrap, hwAsSlotId=hwAsSlotId, hwAsSlotIdInvalidNotify=hwAsSlotIdInvalidNotify, hwAsMacWhitelistEntry=hwAsMacWhitelistEntry, hwTplmASGroupGoup=hwTplmASGroupGoup, hwAsmngObjects=hwAsmngObjects, hwTopomngTrapObjectsGroup=hwTopomngTrapObjectsGroup, hwMbrMngFabricPortDescription=hwMbrMngFabricPortDescription, hwTopomngTrapPeerPortName=hwTopomngTrapPeerPortName, hwTplmTraps=hwTplmTraps, hwAsIfAlias=hwAsIfAlias, hwASBoardTrap=hwASBoardTrap, hwTplmConfigManagementTable=hwTplmConfigManagementTable, hwTopoLocalTrunkId=hwTopoLocalTrunkId, hwTopomngExploreTime=hwTopomngExploreTime, hwASCPUTrap=hwASCPUTrap, hwAsmngTrapAsActualeType=hwAsmngTrapAsActualeType, hwAsmngTrapAsMac=hwAsmngTrapAsMac, hwVermngTrapsGroup=hwVermngTrapsGroup, hwAsMacBlacklistTable=hwAsMacBlacklistTable, hwAsmngTrapAsIfName=hwAsmngTrapAsIfName, hwAsEntityPortType=hwAsEntityPortType, hwTopoPeerDeviceIndex=hwTopoPeerDeviceIndex, hwAsIpNetMask=hwAsIpNetMask, hwASMemUtilizationResume=hwASMemUtilizationResume, hwAsmngTrapAsOnlineFailReasonDesc=hwAsmngTrapAsOnlineFailReasonDesc, hwAsmngTrapAddedAsSlotType=hwAsmngTrapAddedAsSlotType, hwAsModel=hwAsModel, hwTopoLocalRole=hwTopoLocalRole, hwAsEntityPhysicalTable=hwAsEntityPhysicalTable, hwVermngTraps=hwVermngTraps, hwASBrdTempAlarm=hwASBrdTempAlarm, hwAsModelNotMatchNotify=hwAsModelNotMatchNotify, hwAsEntityPhysicalIndex=hwAsEntityPhysicalIndex, hwAsSlotRowStatus=hwAsSlotRowStatus, hwAsmngTrapAddedAsMac=hwAsmngTrapAddedAsMac, hwUniAsBaseAsName=hwUniAsBaseAsName, hwUnimngModeNotMatchNotify=hwUnimngModeNotMatchNotify, hwTplmPortGroupType=hwTplmPortGroupType, hwTopomngTrapReason=hwTopomngTrapReason, hwUniAsBaseEntityTrapCommunicateType=hwUniAsBaseEntityTrapCommunicateType, hwAsMacWhitelistMacAddr=hwAsMacWhitelistMacAddr, hwAsmngTrapAsIfIndex=hwAsmngTrapAsIfIndex, hwVermngUpgradeInfoAsSysSoftwareVer=hwVermngUpgradeInfoAsSysSoftwareVer, hwAsSlotModelNotMatchNotify=hwAsSlotModelNotMatchNotify, hwUniMbrLinkStatTrapLocalPortName=hwUniMbrLinkStatTrapLocalPortName, hwASBoardFail=hwASBoardFail, hwAsEntityPhysicalMfgName=hwAsEntityPhysicalMfgName, hwAsIfLinkUpDownTrapEnable=hwAsIfLinkUpDownTrapEnable, hwMbrMngFabricPortMemberIfName=hwMbrMngFabricPortMemberIfName, hwVermngGlobalObjects=hwVermngGlobalObjects, hwAsIfSpeed=hwAsIfSpeed, hwAsPortStateChangeToDownNotify=hwAsPortStateChangeToDownNotify, hwAsNameConflictNotify=hwAsNameConflictNotify, hwAsIfAdminStatus=hwAsIfAdminStatus, hwAsmngMacWhitelistGroup=hwAsmngMacWhitelistGroup, hwASFanInsert=hwASFanInsert, hwVermngUpgradeInfoAsUpgradeType=hwVermngUpgradeInfoAsUpgradeType, hwAsEntryAliasLogicalIndexOrZero=hwAsEntryAliasLogicalIndexOrZero, hwAsEntityAliasMappingTable=hwAsEntityAliasMappingTable, hwTplmTrap=hwTplmTrap, hwTopoLocalHop=hwTopoLocalHop, hwTplmPortIfIndex=hwTplmPortIfIndex, hwUniAsBaseThresholdEntCurrent=hwUniAsBaseThresholdEntCurrent, hwASMemoryTrap=hwASMemoryTrap, hwAsmngTraps=hwAsmngTraps, hwAsmngGlobalObjects=hwAsmngGlobalObjects, hwAsAuthMode=hwAsAuthMode, hwTplmASId=hwTplmASId, hwASBoardFailResume=hwASBoardFailResume, hwAsmngTrapAsIfType=hwAsmngTrapAsIfType, hwUniMbrTrapIllegalConfigReason=hwUniMbrTrapIllegalConfigReason, hwAsmngTrapAsFaultTimes=hwAsmngTrapAsFaultTimes, hwTplmASGroupIndex=hwTplmASGroupIndex, hwTplmPortGroupNetworkEnhancedProfile=hwTplmPortGroupNetworkEnhancedProfile, hwAsIfOutUcastPkts=hwAsIfOutUcastPkts, hwTplmConfigManagement=hwTplmConfigManagement, hwUniAsBaseTrapProbableCause=hwUniAsBaseTrapProbableCause, hwTplmASGroupRowStatus=hwTplmASGroupRowStatus, hwTplmASGroupEntry=hwTplmASGroupEntry, hwASOpticalInvalidResume=hwASOpticalInvalidResume, hwTplmTrapObjectsGroup=hwTplmTrapObjectsGroup, hwAsOnlineTime=hwAsOnlineTime, hwAsEntityAliasMappingEntry=hwAsEntityAliasMappingEntry, hwAsmngTrapAsVersion=hwAsmngTrapAsVersion, hwAsAutoReplaceEnable=hwAsAutoReplaceEnable, hwAsmngEntityAliasMappingGroup=hwAsmngEntityAliasMappingGroup, hwAsmngTrapParentUnimngMode=hwAsmngTrapParentUnimngMode, hwVermngObjects=hwVermngObjects, hwUniAsBaseThresholdLowWarning=hwUniAsBaseThresholdLowWarning, hwAsSlotTable=hwAsSlotTable, hwVermngAsTypeCfgInfoAsTypeIndex=hwVermngAsTypeCfgInfoAsTypeIndex, hwASPowerRemove=hwASPowerRemove, hwUniAsBaseEntPhysicalContainedIn=hwUniAsBaseEntPhysicalContainedIn, hwAsmngSlotGroup=hwAsmngSlotGroup, hwUnimngConformance=hwUnimngConformance, hwAsEntityAdminStatus=hwAsEntityAdminStatus, hwVermngUpgradeInfoAsErrorDescr=hwVermngUpgradeInfoAsErrorDescr, hwVermngAsTypeCfgInfoEntry=hwVermngAsTypeCfgInfoEntry, hwTplmASGroupProfileStatus=hwTplmASGroupProfileStatus, hwUniMbrFabricPortMemberDelete=hwUniMbrFabricPortMemberDelete, hwAsFullNotify=hwAsFullNotify, hwUniAsBaseTrapEventType=hwUniAsBaseTrapEventType, hwUniBaseTrapObjectsGroup=hwUniBaseTrapObjectsGroup, hwUniAsBaseThresholdType=hwUniAsBaseThresholdType, hwTplmPortGroupProfileStatus=hwTplmPortGroupProfileStatus, hwUniMbrASDiscoverAttack=hwUniMbrASDiscoverAttack, hwUniMbrTrapAsIndex=hwUniMbrTrapAsIndex, hwTopomngObjects=hwTopomngObjects, hwAsVpnInstance=hwAsVpnInstance, hwAsmngEntityPhysicalGroup=hwAsmngEntityPhysicalGroup, hwTplmObjects=hwTplmObjects, hwAsmngTrapAsUnimngMode=hwAsmngTrapAsUnimngMode, hwAsComboPortTypeChangeNotify=hwAsComboPortTypeChangeNotify, hwTplmTrapASName=hwTplmTrapASName, hwUnimngObjects=hwUnimngObjects, hwVermngUpgradeInfoAsDownloadSoftware=hwVermngUpgradeInfoAsDownloadSoftware, hwUniAsBaseThresholdEntValue=hwUniAsBaseThresholdEntValue, hwTopomngTrapObjects=hwTopomngTrapObjects, hwVermngUpgradeInfoAsUpgradeResult=hwVermngUpgradeInfoAsUpgradeResult, hwTplmPortGroupName=hwTplmPortGroupName, hwAsEntityAlarmLight=hwAsEntityAlarmLight, hwUniAsBaseEntPhysicalIndex=hwUniAsBaseEntPhysicalIndex, hwAsmngGlobalObjectsGroup=hwAsmngGlobalObjectsGroup, hwASOpticalInvalid=hwASOpticalInvalid, hwAsEntityOperStatus=hwAsEntityOperStatus, hwVermngUpgradeInfoAsDownloadPatch=hwVermngUpgradeInfoAsDownloadPatch, hwAsIfIndex=hwAsIfIndex, hwUniAsBaseTraps=hwUniAsBaseTraps, hwAsIfType=hwAsIfType, hwAsBoardAddNotify=hwAsBoardAddNotify, hwAsEntityPhysicalParentRelPos=hwAsEntityPhysicalParentRelPos, hwAsAccessUser=hwAsAccessUser, hwUniMbrIllegalFabricConfig=hwUniMbrIllegalFabricConfig, hwMbrTrapObjectsGroup=hwMbrTrapObjectsGroup, hwAsBoardPlugInNotify=hwAsBoardPlugInNotify, hwAsCpuUseage=hwAsCpuUseage, hwAsEntityPhysicalVendorType=hwAsEntityPhysicalVendorType, hwAsMacWhitelistRowStatus=hwAsMacWhitelistRowStatus, hwASCommunicateError=hwASCommunicateError, hwASPowerInvalidResume=hwASPowerInvalidResume, hwAsAddOffLineNotify=hwAsAddOffLineNotify, hwTplmASGoup=hwTplmASGoup, hwASCommunicateTrap=hwASCommunicateTrap, hwAsmngTrapParentVersion=hwAsmngTrapParentVersion, hwTplmConfigManagementCommit=hwTplmConfigManagementCommit, hwASCPUUtilizationRising=hwASCPUUtilizationRising) mibBuilder.exportSymbols("HUAWEI-UNIMNG-MIB", hwTopomngTrapLocalMac=hwTopomngTrapLocalMac, hwVermngTrapObjects=hwVermngTrapObjects, hwTopomngCompliance=hwTopomngCompliance, hwVermngAsTypeCfgInfoPatch=hwVermngAsTypeCfgInfoPatch, hwTplmCmdExecuteFailedNotify=hwTplmCmdExecuteFailedNotify, hwAsEntryAliasMappingIdentifier=hwAsEntryAliasMappingIdentifier, hwAsmngTrapAsIndex=hwAsmngTrapAsIndex, hwVermngUpgradeFail=hwVermngUpgradeFail, hwMbrCompliances=hwMbrCompliances, hwMbrFabricPortGroup=hwMbrFabricPortGroup, hwAsIfAsId=hwAsIfAsId, hwTopomngTrapPeerMac=hwTopomngTrapPeerMac, hwAsBoardDeleteNotify=hwAsBoardDeleteNotify, hwAsIfXEntry=hwAsIfXEntry, hwVermngUpgradeInfoAsFilePhase=hwVermngUpgradeInfoAsFilePhase, hwMbrCompliance=hwMbrCompliance, hwUniAsBaseTrapSeverity=hwUniAsBaseTrapSeverity, hwUnimngMIB=hwUnimngMIB, hwTplmCompliances=hwTplmCompliances, hwAsIfHCOutOctets=hwAsIfHCOutOctets, hwAsmngCompliances=hwAsmngCompliances, hwASOpticalTrap=hwASOpticalTrap, hwVermngAsTypeCfgInfoSystemSoftwareVer=hwVermngAsTypeCfgInfoSystemSoftwareVer, hwAsInBlacklistNotify=hwAsInBlacklistNotify, hwAsEntityPhysicalContainedIn=hwAsEntityPhysicalContainedIn, hwAsEntityPhysicalEntry=hwAsEntityPhysicalEntry, hwAsDelOffLineNotify=hwAsDelOffLineNotify, hwUniAsBaseEntityPhysicalIndex=hwUniAsBaseEntityPhysicalIndex, hwVermngAsTypeCfgInfoAsTypeName=hwVermngAsTypeCfgInfoAsTypeName, hwAsEntityPhysicalClass=hwAsEntityPhysicalClass, hwUnimngNotification=hwUnimngNotification, hwASEnvironmentTrap=hwASEnvironmentTrap, hwMbrmngObjects=hwMbrmngObjects, hwVermngFileServerType=hwVermngFileServerType, hwTplmPortPortGroupName=hwTplmPortPortGroupName, hwASFanInvalid=hwASFanInvalid, hwUniAsBaseAsId=hwUniAsBaseAsId, hwAsmngTrapObjectsGroup=hwAsmngTrapObjectsGroup, hwMbrTrapsGroup=hwMbrTrapsGroup, hwAsmngTrapAsSlotId=hwAsmngTrapAsSlotId, hwTplmConfigManagementGoup=hwTplmConfigManagementGoup, hwTplmConfigManagementASId=hwTplmConfigManagementASId, hwAsSlotState=hwAsSlotState, hwVermngUpgradeInfoAsSysSoftware=hwVermngUpgradeInfoAsSysSoftware, hwTplmPortGroupEntry=hwTplmPortGroupEntry, hwTopoPeerRole=hwTopoPeerRole, hwAsVersionNotMatchNotify=hwAsVersionNotMatchNotify, hwTopomngCompliances=hwTopomngCompliances, hwAsIpAddress=hwAsIpAddress, hwASPowerInvalid=hwASPowerInvalid, hwAsRunState=hwAsRunState, hwTplmASGroupName=hwTplmASGroupName, hwUniMbrTrapObjects=hwUniMbrTrapObjects, hwAsBoardPlugOutNotify=hwAsBoardPlugOutNotify, hwAsEntityPhysicalHardwareRev=hwAsEntityPhysicalHardwareRev, hwASPowerTrap=hwASPowerTrap, hwUniBaseTrapsGroup=hwUniBaseTrapsGroup, hwAsIfOperStatus=hwAsIfOperStatus, hwAsIfName=hwAsIfName, hwAsIfHighSpeed=hwAsIfHighSpeed, hwAsOnlineFailNotify=hwAsOnlineFailNotify, hwUniAsBaseReasonDescription=hwUniAsBaseReasonDescription, hwAsRowstatus=hwAsRowstatus, hwAsIfTable=hwAsIfTable, hwASFanRemove=hwASFanRemove, hwAsEntityPhysicalSoftwareRev=hwAsEntityPhysicalSoftwareRev, hwVermngUpgradeInfoAsUpgradeState=hwVermngUpgradeInfoAsUpgradeState, hwAsIfInMulticastPkts=hwAsIfInMulticastPkts, hwASFanInvalidResume=hwASFanInvalidResume, hwAsIfDescr=hwAsIfDescr, hwMbrMngFabricPortDirection=hwMbrMngFabricPortDirection, hwTplmTrapObjects=hwTplmTrapObjects, hwUniAsBaseThresholdLowCritical=hwUniAsBaseThresholdLowCritical, hwAsEntityPhysicalSerialNum=hwAsEntityPhysicalSerialNum, hwUniMbrConnectError=hwUniMbrConnectError, hwAsIfHCInOctets=hwAsIfHCInOctets, hwTopomngLinkNormal=hwTopomngLinkNormal, hwTplmPortRowStatus=hwTplmPortRowStatus, hwAsIfInBroadcastPkts=hwAsIfInBroadcastPkts, hwVermngAsTypeCfgInfoGroup=hwVermngAsTypeCfgInfoGroup, hwASMadConflictDetect=hwASMadConflictDetect, hwAsmngTrap=hwAsmngTrap, hwAsSysmacSwitchCfgErrNotify=hwAsSysmacSwitchCfgErrNotify, hwASPowerInsert=hwASPowerInsert, AlarmStatus=AlarmStatus, hwUniMbrTraps=hwUniMbrTraps, hwVermngUpgradeInfoAsErrorCode=hwVermngUpgradeInfoAsErrorCode, hwAsMac=hwAsMac, hwUniAsBaseThresholdHighCritical=hwUniAsBaseThresholdHighCritical, hwTopomngTrapLocalTrunkId=hwTopomngTrapLocalTrunkId, hwAsSn=hwAsSn, hwTplmPortTable=hwTplmPortTable, hwUniMbrTrapAsSysName=hwUniMbrTrapAsSysName, hwAsUnconfirmedNotify=hwAsUnconfirmedNotify, hwUniMbrTrap=hwUniMbrTrap, hwTplmPortGroupRowStatus=hwTplmPortGroupRowStatus, hwAsmngEntityStateGroup=hwAsmngEntityStateGroup, hwTplmConfigManagementEntry=hwTplmConfigManagementEntry, hwTopomngTrapPeerTrunkId=hwTopomngTrapPeerTrunkId, hwUniAsBaseThresholdHwBaseThresholdIndex=hwUniAsBaseThresholdHwBaseThresholdIndex, hwTplmASRowStatus=hwTplmASRowStatus, hwAsmngTrapAsIfAdminStatus=hwAsmngTrapAsIfAdminStatus, hwASMadConflictResume=hwASMadConflictResume, hwAsEntityPhysicalFirmwareRev=hwAsEntityPhysicalFirmwareRev, hwMbrMngFabricPortTable=hwMbrMngFabricPortTable, hwMbrMngFabricPortIndirectFlag=hwMbrMngFabricPortIndirectFlag, hwAsmngAsIfXGroup=hwAsmngAsIfXGroup, hwUniBaseTrapCompliances=hwUniBaseTrapCompliances, hwTplmASTable=hwTplmASTable, hwUniAsBaseThresholdHwBaseThresholdType=hwUniAsBaseThresholdHwBaseThresholdType, hwMbrMngFabricPortEntry=hwMbrMngFabricPortEntry, hwVermngAsTypeCfgInfoRowStatus=hwVermngAsTypeCfgInfoRowStatus, hwAsIfInUcastPkts=hwAsIfInUcastPkts, hwUniAsBaseTrapObjects=hwUniAsBaseTrapObjects, PYSNMP_MODULE_ID=hwUnimngMIB, hwAsNormalNotify=hwAsNormalNotify, hwMbrMngFabricPortId=hwMbrMngFabricPortId, hwTplmASASGroupName=hwTplmASASGroupName, hwVermngUpgradeInfoAsIndex=hwVermngUpgradeInfoAsIndex)
def kill_timer(timer): timer.cancel() def init(): global timeout_add global timeout_end timeout_add = pyjd.gobject.timeout_add timeout_end = kill_timer
#!/usr/bin/python3 class _LockCtx(object): __slots__ = ( "__evt", "__bPreventFiringOnUnlock" ) def __init__(self, evt, bPreventFiringOnUnlock:bool = False): self.__evt = evt self.__bPreventFiringOnUnlock = bPreventFiringOnUnlock # def dump(self): print("_LockCtx(") print("\t__evt = " + str(self.__evt)) print("\t__bPreventFiringOnUnlock = " + str(self.__bPreventFiringOnUnlock)) print(")") # def preventFiringOnUnlock(self): self.__bPreventFiringOnUnlock = True # def __enter__(self): return self # def __exit__(self, exType, exObj, traceback): self.__evt.unlock(bPreventFiring = self.__bPreventFiringOnUnlock or (exType is not None)) # # class ObservableEvent(object): def __init__(self, name:str = None, bCatchExceptions:bool = False): self.__name = name self.__listeners = tuple() self.__bCatchExceptions = bCatchExceptions self.__lockCounter = 0 self.__bNeedFiring = False self.__lockCtx = None # @property def catchExceptions(self): return self.__bCatchExceptions # @property def name(self): return self.__name # @property def listeners(self): return self.__listeners # def __len__(self): return len(self.__listeners) # def removeAllListeners(self): self.__listeners = tuple() # def __str__(self): if self.__name: ret = repr(self.__name)[1:][:-1] + "(" else: ret = "Event(" if len(self.__listeners) == 0: ret += "no listener" elif len(self.__listeners) == 1: ret += "1 listener" else: ret += str(len(self.__listeners)) + " listeners" if self.__lockCounter > 0: ret += ", lockCounter=" + str(self.__lockCounter) if self.__bNeedFiring: ret += ", fire on unlock" return ret + ")" # def __repr__(self): return self.__str__() # def add(self, theCallable:callable): assert theCallable != None self.__listeners += (theCallable,) return self # def __iadd__(self, theCallable:callable): assert theCallable != None self.__listeners += (theCallable,) return self # def remove(self, theCallable:callable) -> bool: assert theCallable != None if theCallable in self.__listeners: n = self.__listeners.index(theCallable) self.__listeners = self.__listeners[:n] + self.__listeners[n + 1:] return True else: return False # def __isub__(self, theCallable:callable): assert theCallable != None if theCallable in self.__listeners: n = self.__listeners.index(theCallable) self.__listeners = self.__listeners[:n] + self.__listeners[n + 1:] return True else: return False # def __call__(self, *argv, **kwargs): if self.__bCatchExceptions: try: for listener in self.__listeners: listener(*argv, **kwargs) except Exception as ee: pass else: for listener in self.__listeners: listener(*argv, **kwargs) # def fire(self, *argv, **kwargs): if self.__lockCounter > 0: self.__bNeedFiring = True else: self.__bNeedFiring = False if self.__bCatchExceptions: try: for listener in self.__listeners: listener(*argv, **kwargs) except Exception as ee: pass else: for listener in self.__listeners: listener(*argv, **kwargs) # def lock(self): self.__lockCounter += 1 if self.__lockCtx is None: self.__lockCtx = _LockCtx(self) return self.__lockCtx # def unlock(self, bPreventFiring:bool = False): assert self.__lockCounter > 0 self.__lockCounter -= 1 if self.__bNeedFiring: if bPreventFiring: self.__bNeedFiring = False else: self.fire() # #
includes=["<def.h>", #for uint64_t "<io/Output.h>", #for kout "<io/IntegerFormatter.h>",#for Hex,Bin ] reg_defs=[ ["","uint32_t",[["RES0",2, "EL",2, "RES0",28]],"sys_reg_name","CurrentEL"], ["","uint32_t",[["RES0",6, "F",1, "I",1, "A",1 ,"D",1, "RES0",22]],"sys_reg_name","DAIF"], # Exception related ["","uint64_t",[["Addr,Hex",64]],"sys_reg_name","VBAR_EL1"], ["","uint64_t",[["Addr,Hex",64]],"sys_reg_name","VBAR_EL2"], ["","uint64_t",[["Addr,Hex",64]],"sys_reg_name","VBAR_EL3"], ["","uint64_t",[["returnAddr,Hex",64]],"sys_reg_name","ELR_EL1"], ["","uint64_t",[["returnAddr,Hex",64]],"sys_reg_name","ELR_EL2"], ["","uint64_t",[["returnAddr,Hex",64]],"sys_reg_name","ELR_EL3"], ["","uint32_t",[["ISS,Hex",25, "IL",1, "EC,Hex",6]],"sys_reg_name","ESR_EL1"], ["","uint32_t",[["ISS,Hex",25, "IL",1, "EC,Hex",6]],"sys_reg_name","ESR_EL2"], ["","uint32_t",[["ISS,Hex",25, "IL",1, "EC,Hex",6]],"sys_reg_name","ESR_EL3"], ["","uint64_t",[["faultAddr,Hex",64]],"sys_reg_name","FAR_EL1"], ["","uint64_t",[["faultAddr,Hex",64]],"sys_reg_name","FAR_EL2"], ["","uint64_t",[["faultAddr,Hex",64]],"sys_reg_name","FAR_EL3"], # ELSPMode,e.g. M[3:0], 0b0000=EL0t, 0b0100=EL1t, 0b0101=EL1h # ExeState is execution state, in AARCH64, it is RES0 # 当EL=0时, SPSel只能是0 ["","uint32_t",[["SPSel",1, "RES0",1, "EL",2, "ExeState",1, "RES0",1, "FIQMask",1, "IRQMask",1, "SErrorMask",1, "DebugMask",1, "RES0",10, "IL",1, "SoftwareStep",1, "PAN",1, "UAO",1, "RES0",4, "V",1, "C",1, "Z",1, "N",1]],"sys_reg_name","SPSR_EL1"], ["","uint32_t",[["SPSel",1, "RES0",1, "EL",2, "ExeState",1, "RES0",1, "FIQMask",1, "IRQMask",1, "SErrorMask",1, "DebugMask",1, "RES0",10, "IL",1, "SoftwareStep",1, "PAN",1, "UAO",1, "RES0",4, "V",1, "C",1, "Z",1, "N",1]],"sys_reg_name","SPSR_EL2"], ["","uint32_t",[["SPSel",1, "RES0",1, "EL",2, "ExeState",1, "RES0",1, "FIQMask",1, "IRQMask",1, "SErrorMask",1, "DebugMask",1, "RES0",10, "IL",1, "SoftwareStep",1, "PAN",1, "UAO",1, "RES0",4, "V",1, "C",1, "Z",1, "N",1]],"sys_reg_name","SPSR_EL3"], ["","uint64_t",[["SP",64]],"sys_reg_name","SP_EL0"], ["","uint64_t",[["SP",64]],"sys_reg_name","SP_EL1"], ["","uint64_t",[["SP",64]],"sys_reg_name","SP_EL2"], ["","uint64_t",[["SP",64]],"sys_reg_name","SP_EL3"], ["","uint64_t",[["RES0",28, "V",1, "C",1, "Z",1, "N",1]],"sys_reg_name","NZCV"], # PAN may not be implemented,it is not standard ## NOTE: only available on armv8.1-a and later architectures, so when using g++, option '-march=armv8.2-a' must be present' ["","uint32_t",[["RES0",22, "PAN",1, "RES0",9]],"sys_reg_name","PAN"], #["RegPAN","uint32_t,[["RES0",22, "PAN",1, "RES0",9]],"sys_reg_name",gccReprRegister(3,0,4,2,3)] ["","uint32_t",[["SP",1, "RES0",31]],"sys_reg_name","SPSel"], # influence LDRR/STRR,=1 as LDR/STR ["","uint64_t",[["RES0",23, "UAO",1, "RES0",8]],"sys_reg_name","UAO"], ["","uint64_t",[["PC,Hex",64]],"sys_reg_name","PC"], ["","uint64_t",[["T0SZ",6, "RES0",1, "EPD0",1, "IRGN0",2, "ORGN0",2, "SH0",2, "TG0",2, "T1SZ",6, "A1",1, "EPD1",1, "IRGN1",2, "ORGN1",2, "SH1",2, "TG1",2, "IPS",3, "RES0",1, "AS",1, "TBI0",1, "TBI1",1, "HA",1, "HD",1, "HPD0",1, "HPD1",1, "HWU059",1, "HWU060",1, "HWU061",1, "HWU062",1, "HWU159",1, "HWU160",1, "HWU161",1, "HWU162",1, "RES0",2, "NFD0",1, "NFD1",1, "RES0",9]],"sys_reg_name","TCR_EL1"], ["","uint32_t",[["RES0",6, "F",1, "I",1, "A",1, "RES0",23]],"sys_reg_name","ISR_EL1"], # id registers ["","uint64_t",[["RES0",4, "AES",4, "SHA1",4, "SHA2",4, "CRC32",4, "Atomic",4, "RES0",4, "RDM",4, "SHA3",4, "SM3",4, "SM4",4, "DP",4, "RES0",16]],"sys_reg_name","ID_AA64ISAR0_EL1"], ["","uint32_t",[["PROCID",32]],"sys_reg_name","CONTEXTIDR_EL1"], ["","uint64_t",[["EL0",4, "EL1",4, "EL2",4, "EL3",4, "FP",4, "AdvSIMD",4, "GIC",4, "RAS",4, "SVE",4, "RES0",28 ]],"sys_reg_name","ID_AA64PFR0_EL1"], # if PAN=0b0000, then PAN is not supported ["","uint64_t",[["HAFDBS",4, "VMIDBits",4, "VH",4, "HPDS",4, "LO",4, "PAN",4, "SpecSEI",4, "XNX",4, "RES0",32]],"sys_reg_name","ID_AA64MMFR1_EL1"], # ASIDBits = 0000 8bits, 0010 16bits, others reserved # SNSMem = whether distinct Secure & Non-Secure # BigEnd = whether support mixed-endianess # PARange = supported PArange,from 0000 to 0110, increment sequence is 32(4GB),36(64GB),40(1TB),42(4TB),44(16TB),48(256TB),52(4PB) # TGranXX = 0000,supported XX, 1111 not supported ["","uint64_t",[["PARange",4, "ASIDBits",4, "BigEnd",4, "SNSMem",4, "BigEndEL0",4, "TGran16,Hex",4, "TGran64,Hex",4, "TGran4,Hex",4, "RES0",32]],"sys_reg_name","ID_AA64MMFR0_EL1"], ["","uint32_t",[["Revision",4, "PartNum",12, "Architecture",4, "Variant",4, "Implementer",8]],"sys_reg_name","MIDR_EL1"], ["","uint64_t",[[ "Aff0",8, "Aff1",8, "Aff2",8, "MT",1, "RES0",5, "U",1, "RES1",1, "Aff3",8, "RES0",24]],"sys_reg_name","MPIDR_EL1"], # address translation ## TCR1_EL1.A1 selects which ASID is used.if only 8-bit ASID is supported,the upper bits are res0 ## the lower bits of BADDR, if not needed, should be better set to 0. ## CnP , in ARMv8.1,ARMv8.0, is RES0 ["","uint64_t",[["CnP",1, "BADDR,Hex",47, "ASID",16]],"sys_reg_name","TTBR0_EL1"], ["","uint64_t",[["CnP",1, "BADDR,Hex",47, "ASID",16]],"sys_reg_name","TTBR1_EL1"], ["","uint64_t", [ ["F",1, "RES0",6, "SH",2, "NS",1, "IMP_DEF",1, "RES1",1, "PA47_12,Hex",36, "PA51_48,Hex",4, "RES0",4, "ATTR",8 ], ["F",1, "FST",6, "RES0",1, "PTW",1, "S",1, "RES0",1, "RES1",1, "RES0",36, "IMP_DEF0",4, "IMP_DEF1",4, "IMP_DEF2",8 ] ], "applies",["S0.F==0",""], "sys_reg_name","PAR_EL1" ], # attrn[7:4]=0000 --> Device Memory, # attrn[3:0], when device memory,0000->nGnRnE ["","uint64_t",[["Attr0,Hex",8, "Attr1,Hex",8, "Attr2,Hex",8, "Attr3,Hex",8, "Attr4,Hex",8, "Attr5,Hex",8, "Attr6,Hex",8, "Attr7,Hex",8 ]],"sys_reg_name","MAIR_EL1"], ["","uint64_t",[["Attr0,Hex",8, "Attr1,Hex",8, "Attr2,Hex",8, "Attr3,Hex",8, "Attr4,Hex",8, "Attr5,Hex",8, "Attr6,Hex",8, "Attr7,Hex",8 ]],"sys_reg_name","MAIR_EL2"], ["","uint64_t",[["Attr0,Hex",8, "Attr1,Hex",8, "Attr2,Hex",8, "Attr3,Hex",8, "Attr4,Hex",8, "Attr5,Hex",8, "Attr6,Hex",8, "Attr7,Hex",8 ]],"sys_reg_name","MAIR_EL3"], ["","uint32_t",[["M",1, "A",1, "C",1, "SA",1, "SA0",1, "CP15BEN",1, "RES0",1, "ITD",1, "SED",1, "UMA",1, "RES0",1, "RES1",1, "I",1, "RES0",1, "DZE",1, "UCT",1, "nTWI",1, "RES0",1, "nTWE",1, "WXN",1, "RES1",1, "IESB",1, "RES1",1, "SPAN",1, "E0E",1, "EE",1, "UCI",1, "RES0",1, "nTLSMD",1, "LSMAOE",1, "RES0",2]],"sys_reg_name","SCTLR_EL1"], # Debug ["","uint64_t",[["RestartAddr",64]],"sys_reg_name","DLR_EL0"], ["","uint32_t",[["SPSel",1, "RES0",1, "EL",2, "ExeState",1, "RES0",1, "FIQMask",1, "IRQMask",1, "SErrorMask",1, "DebugMask",1, "RES0",10, "IL",1, "SoftwareStep",1, "PAN",1, "UAO",1, "RES0",4, "V",1, "C",1, "Z",1, "N",1]],"sys_reg_name","DSPSR_EL0"], # SCR,HCR ["","uint64_t",[["VM",1,"SWIO",1,"PTW",1,"FMO",1,"IMO",1,"AMO",1,"VF",1,"VI",1,"VSE",1,"FB",1,"BSU",2,"DC",1,"TWI",1,"TWE",1,"TID0",1,"TID1",1,"TID2",1,"TID3",1,"TSC",1,"TIDCP",1,"TACR",1,"TSW",1,"TPCP",1,"TPU",1,"TTLB",1,"TVM",1,"TGE",1,"TDZ",1,"HCD",1,"TRVM",1,"RW",1,"CD",1,"ID",1,"E2H",1,"TLOR",1,"TERR",1,"TEA",1,"MIOCNCE",1,"RES0",25]],"sys_reg_name","HCR_EL2"], ["","uint32_t",[["NS",1,"FIQ",1,"IRQ",1,"EA",1,"RES1",2,"RES0",1,"SMD",1,"HCE",1,"SIF",1,"RW",1,"ST",1,"TWI",1,"TWE",1,"TLOR",1,"TERR",1,"RES0",16]],"sys_reg_name","SCR_EL3"], # cold-reset ["","uint32_t",[["AA64",1,"RR",1,"RES0",30]],"sys_reg_name","RMR_EL1"], ["","uint32_t",[["AA64",1,"RR",1,"RES0",30]],"sys_reg_name","RMR_EL2"], ["","uint32_t",[["AA64",1,"RR",1,"RES0",30]],"sys_reg_name","RMR_EL3"], ]
class FaultyClient(object): """A faulty scheduler that will always fail""" def __init__(self, cluster_name, hosts, auth, domain, options): pass def setUp(self): pass def tearDown(self): pass def create(self, name, image, command='', template=None, port=5000): raise Exception() def start(self, name): raise Exception() def stop(self, name): raise Exception() def destroy(self, name): raise Exception() def run(self, name, image, command): raise Exception() def attach(self, name): raise Exception() SchedulerClient = FaultyClient
datasetPath = "/storage/mstrobl/dataset" waveformPath = "/storage/mstrobl/waveforms" featurePath = "/storage/mstrobl/features/" quantumPath = "/storage/mstrobl/quantum/" modelsPath = "/storage/mstrobl/models" testDatasetPath = "/storage/mstrobl/testDataset" testWaveformPath = "/storage/mstrobl/testWaveforms" testFeaturePath = "/storage/mstrobl/testFeatures" testQuantumPath = "/storage/mstrobl/testDataQuantum"
def one_line(): output = [] with open("toChris.txt", "r") as f: line = f.readline() counter = 0 temp = [] while line: if "{" in line: counter += 1 elif "}" in line: counter -= 1 temp.append(line) if counter == 0: output.append(temp) temp = [] line = f.readline() result = [] for o in output: txt = "".join(o).replace("\n", "").replace(" ", "").replace(":", ": ") result.append(txt) return "\n".join(result) if __name__ == "__main__": print(one_line())
# M이상 N이하의 소수를 모두 출력하는 프로그램을 작성하시오. # input # 3 16 # # output # 3 # 5 # 7 # 11 # 13 n, m = map(int, input().split()) check = [False] * (m+1) # check[i] == True: i는 지워짐 # check[i] == False: i는 지워지지 않음 primes = [] for i in range(2, m+1): # 지워 졌으면 스킵 if check[i]: continue # 지워지지 않으면서 가장 작은 수 if i >= n: primes.append(i) # i*i부터 i의 배수를 모두 지워버린다 for j in range(i*i, m+1, i): check[j] = True print("\n".join(map(str, primes)))
class Solution(object): def fib(self, N): """ :type N: int :rtype: int """ return self.dynamicProgramming(N) def recursive(self, N): if N <= 1: return N else: return self.recursive(N - 1) + self.recursive(N - 2) def dynamicProgramming(self, N): if N <= 1: return N dp = [0] * (N + 1) dp[0] = 0 dp[1] = 1 for i in range(N - 1): dp[i + 2] = dp[i + 1] + dp[i] return dp[N] def formula(self, N): return int(round(((1 + 5 ** 0.5) / 2) ** N / 5 ** 0.5))
""" # Sample code to perform I/O: name = input() # Reading input from STDIN print('Hi, %s.' % name) # Writing output to STDOUT # Warning: Printing unwanted or ill-formatted data to output will cause the test cases to fail """ # Write your code here t = int(input()) for _ in range(t): n = int(input()) s = input() tracks = [0, 0] counts = [0, 1] pos = 0 for i in range(1, n): while pos > 0 and s[i] != s[pos]: pos = tracks[pos] if s[pos] == s[i]: pos += 1 tracks.append(pos) counts.append(counts[pos] + 1) print(sum(counts))
def fib(a, b, end): c = 0 fib_list = [a, b] if end == 0: return fib_list while c < end: nxt = fib_list[c] + fib_list[c + 1] fib_list.append(nxt) c += 1 if nxt >= end: break return fib_list def fib_memo(n): """ uses memoization to reduce calculations by retrieving what has already been calculated :param n: number :return: resulting fibonacci """ known = {0: 0, 1: 1} if n in known: return known[n] res = fib_memo(n - 1) + fib_memo(n - 2) known[n] = res return res def nth_fibonacci(n): """ Takes an integer n and returns the nth fibonacci :return: nth fibonacci """ # edge cases if n < 0: raise Exception("Value in series can not be negative") elif n in [0, 1]: return n # we'll be building the fibonacci series from the bottom up # so we'll need to track the previous 2 numbers at each step prev_prev = 0 # 0th fibonacci prev = 1 # 1st fibonacci for _ in range(n - 1): # Iteration 1: current = 2nd fibonacci # Iteration 2: current = 3rd fibonacci # Iteration 3: current = 4th fibonacci # To get nth fibonacci ... do n-1 iterations. current = prev + prev_prev prev_prev = prev prev = current return current
"""Wide_Eastasian table. Created by setup.py.""" # Generated: 2016-07-02T04:20:28.048222 # Source: EastAsianWidth-9.0.0.txt # Date: 2016-05-27, 17:00:00 GMT [KW, LI] WIDE_EASTASIAN = ( (0x1100, 0x115f,), # Hangul Choseong Kiyeok ..Hangul Choseong Filler (0x231a, 0x231b,), # Watch ..Hourglass (0x2329, 0x232a,), # Left-pointing Angle Brac..Right-pointing Angle Bra (0x23e9, 0x23ec,), # Black Right-pointing Dou..Black Down-pointing Doub (0x23f0, 0x23f0,), # Alarm Clock ..Alarm Clock (0x23f3, 0x23f3,), # Hourglass With Flowing S..Hourglass With Flowing S (0x25fd, 0x25fe,), # White Medium Small Squar..Black Medium Small Squar (0x2614, 0x2615,), # Umbrella With Rain Drops..Hot Beverage (0x2648, 0x2653,), # Aries ..Pisces (0x267f, 0x267f,), # Wheelchair Symbol ..Wheelchair Symbol (0x2693, 0x2693,), # Anchor ..Anchor (0x26a1, 0x26a1,), # High Voltage Sign ..High Voltage Sign (0x26aa, 0x26ab,), # Medium White Circle ..Medium Black Circle (0x26bd, 0x26be,), # Soccer Ball ..Baseball (0x26c4, 0x26c5,), # Snowman Without Snow ..Sun Behind Cloud (0x26ce, 0x26ce,), # Ophiuchus ..Ophiuchus (0x26d4, 0x26d4,), # No Entry ..No Entry (0x26ea, 0x26ea,), # Church ..Church (0x26f2, 0x26f3,), # Fountain ..Flag In Hole (0x26f5, 0x26f5,), # Sailboat ..Sailboat (0x26fa, 0x26fa,), # Tent ..Tent (0x26fd, 0x26fd,), # Fuel Pump ..Fuel Pump (0x2705, 0x2705,), # White Heavy Check Mark ..White Heavy Check Mark (0x270a, 0x270b,), # Raised Fist ..Raised Hand (0x2728, 0x2728,), # Sparkles ..Sparkles (0x274c, 0x274c,), # Cross Mark ..Cross Mark (0x274e, 0x274e,), # Negative Squared Cross M..Negative Squared Cross M (0x2753, 0x2755,), # Black Question Mark Orna..White Exclamation Mark O (0x2757, 0x2757,), # Heavy Exclamation Mark S..Heavy Exclamation Mark S (0x2795, 0x2797,), # Heavy Plus Sign ..Heavy Division Sign (0x27b0, 0x27b0,), # Curly Loop ..Curly Loop (0x27bf, 0x27bf,), # Double Curly Loop ..Double Curly Loop (0x2b1b, 0x2b1c,), # Black Large Square ..White Large Square (0x2b50, 0x2b50,), # White Medium Star ..White Medium Star (0x2b55, 0x2b55,), # Heavy Large Circle ..Heavy Large Circle (0x2e80, 0x2e99,), # Cjk Radical Repeat ..Cjk Radical Rap (0x2e9b, 0x2ef3,), # Cjk Radical Choke ..Cjk Radical C-simplified (0x2f00, 0x2fd5,), # Kangxi Radical One ..Kangxi Radical Flute (0x2ff0, 0x2ffb,), # Ideographic Description ..Ideographic Description (0x3000, 0x303e,), # Ideographic Space ..Ideographic Variation In (0x3041, 0x3096,), # Hiragana Letter Small A ..Hiragana Letter Small Ke (0x3099, 0x30ff,), # Combining Katakana-hirag..Katakana Digraph Koto (0x3105, 0x312d,), # Bopomofo Letter B ..Bopomofo Letter Ih (0x3131, 0x318e,), # Hangul Letter Kiyeok ..Hangul Letter Araeae (0x3190, 0x31ba,), # Ideographic Annotation L..Bopomofo Letter Zy (0x31c0, 0x31e3,), # Cjk Stroke T ..Cjk Stroke Q (0x31f0, 0x321e,), # Katakana Letter Small Ku..Parenthesized Korean Cha (0x3220, 0x3247,), # Parenthesized Ideograph ..Circled Ideograph Koto (0x3250, 0x32fe,), # Partnership Sign ..Circled Katakana Wo (0x3300, 0x4dbf,), # Square Apaato .. (0x4e00, 0xa48c,), # Cjk Unified Ideograph-4e..Yi Syllable Yyr (0xa490, 0xa4c6,), # Yi Radical Qot ..Yi Radical Ke (0xa960, 0xa97c,), # Hangul Choseong Tikeut-m..Hangul Choseong Ssangyeo (0xac00, 0xd7a3,), # Hangul Syllable Ga ..Hangul Syllable Hih (0xf900, 0xfaff,), # Cjk Compatibility Ideogr.. (0xfe10, 0xfe19,), # Presentation Form For Ve..Presentation Form For Ve (0xfe30, 0xfe52,), # Presentation Form For Ve..Small Full Stop (0xfe54, 0xfe66,), # Small Semicolon ..Small Equals Sign (0xfe68, 0xfe6b,), # Small Reverse Solidus ..Small Commercial At (0xff01, 0xff60,), # Fullwidth Exclamation Ma..Fullwidth Right White Pa (0xffe0, 0xffe6,), # Fullwidth Cent Sign ..Fullwidth Won Sign (0x16fe0, 0x16fe0,), # (nil) .. (0x17000, 0x187ec,), # (nil) .. (0x18800, 0x18af2,), # (nil) .. (0x1b000, 0x1b001,), # Katakana Letter Archaic ..Hiragana Letter Archaic (0x1f004, 0x1f004,), # Mahjong Tile Red Dragon ..Mahjong Tile Red Dragon (0x1f0cf, 0x1f0cf,), # Playing Card Black Joker..Playing Card Black Joker (0x1f18e, 0x1f18e,), # Negative Squared Ab ..Negative Squared Ab (0x1f191, 0x1f19a,), # Squared Cl ..Squared Vs (0x1f200, 0x1f202,), # Square Hiragana Hoka ..Squared Katakana Sa (0x1f210, 0x1f23b,), # Squared Cjk Unified Ideo.. (0x1f240, 0x1f248,), # Tortoise Shell Bracketed..Tortoise Shell Bracketed (0x1f250, 0x1f251,), # Circled Ideograph Advant..Circled Ideograph Accept (0x1f300, 0x1f320,), # Cyclone ..Shooting Star (0x1f32d, 0x1f335,), # Hot Dog ..Cactus (0x1f337, 0x1f37c,), # Tulip ..Baby Bottle (0x1f37e, 0x1f393,), # Bottle With Popping Cork..Graduation Cap (0x1f3a0, 0x1f3ca,), # Carousel Horse ..Swimmer (0x1f3cf, 0x1f3d3,), # Cricket Bat And Ball ..Table Tennis Paddle And (0x1f3e0, 0x1f3f0,), # House Building ..European Castle (0x1f3f4, 0x1f3f4,), # Waving Black Flag ..Waving Black Flag (0x1f3f8, 0x1f43e,), # Badminton Racquet And Sh..Paw Prints (0x1f440, 0x1f440,), # Eyes ..Eyes (0x1f442, 0x1f4fc,), # Ear ..Videocassette (0x1f4ff, 0x1f53d,), # Prayer Beads ..Down-pointing Small Red (0x1f54b, 0x1f54e,), # Kaaba ..Menorah With Nine Branch (0x1f550, 0x1f567,), # Clock Face One Oclock ..Clock Face Twelve-thirty (0x1f57a, 0x1f57a,), # (nil) .. (0x1f595, 0x1f596,), # Reversed Hand With Middl..Raised Hand With Part Be (0x1f5a4, 0x1f5a4,), # (nil) .. (0x1f5fb, 0x1f64f,), # Mount Fuji ..Person With Folded Hands (0x1f680, 0x1f6c5,), # Rocket ..Left Luggage (0x1f6cc, 0x1f6cc,), # Sleeping Accommodation ..Sleeping Accommodation (0x1f6d0, 0x1f6d2,), # Place Of Worship .. (0x1f6eb, 0x1f6ec,), # Airplane Departure ..Airplane Arriving (0x1f6f4, 0x1f6f6,), # (nil) .. (0x1f910, 0x1f91e,), # Zipper-mouth Face .. (0x1f920, 0x1f927,), # (nil) .. (0x1f930, 0x1f930,), # (nil) .. (0x1f933, 0x1f93e,), # (nil) .. (0x1f940, 0x1f94b,), # (nil) .. (0x1f950, 0x1f95e,), # (nil) .. (0x1f980, 0x1f991,), # Crab .. (0x1f9c0, 0x1f9c0,), # Cheese Wedge ..Cheese Wedge (0x20000, 0x2fffd,), # Cjk Unified Ideograph-20.. (0x30000, 0x3fffd,), # (nil) .. )
#!/usr/bin/python # -*- coding: utf-8 -*- ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' module: win_dfs_namespace_root short_description: Set up a DFS namespace. description: - This module creates/manages Windows DFS namespaces. - Prior to using this module it's required to install File Server with FS-DFS-Namespace feature and create shares for namespace root on all member servers. - For more details about DFSN see U(https://docs.microsoft.com/en-us/windows-server/storage/dfs-namespaces/dfs-overview) notes: - Setting state for targets is not implemented - Setting namespace admin grants is not implemented - Setting referral priority options is not implemented options: path: description: - UNC path for the root of a DFS namespace. This path must be unique. type: str required: true targets: description: - List of UNC paths for DFS root targets. - Targets which are configured in namespace and are not listed here, will be removed from namespace. - Required when C(state) is not C(absent). - Target hosts must be referenced by FDQN if DFSN server has not configured with C(UseFQDN) option (U(https://support.microsoft.com/de-de/help/244380/how-to-configure-dfs-to-use-fully-qualified-domain-names-in-referrals)) type: list description: description: - Description of DFS namespace type: str type: description: - Type of DFS namespace - C(Standalone) - stand-alone namespace. - C(DomainV1) - Windows 2000 Server mode domain namespace. - C(DomainV2) - Windows Server 2008 mode domain namespace. choices: - DomainV1 - DomainV2 - Standalone default: DomainV2 state: description: - When C(present), the namespace will be created if not exists. - When C(absent), the namespace will be removed. - When C(online), the namespace will be created if not exists and will be put in online state. - When C(offline), the namespace will be created if not exists and will be put in offline state. - When C(online)/C(offline) only state of namespace will be set, not the state of targets. choices: - present - absent - online - offline default: present access_based_enumeration: description: - Indicates whether a DFS namespace uses access-based enumeration. - If this value is C(yes), a DFS namespace server shows a user only the files and folders that the user can access. type: bool default: false insite_referrals: description: - Indicates whether a DFS namespace server provides a client only with referrals that are in the same site as the client. - If this value is C(yes), the DFS namespace server provides only in-site referrals. - If this value is C(no), the DFS namespace server provides in-site referrals first, then other referrals. type: bool default: false root_scalability: description: - Indicates whether a DFS namespace uses root scalability mode. - If this value is C(yes), DFS namespace servers connect to the nearest domain controllers for periodic namespace updates. - If this value is C(no), the servers connect to the primary domain controller (PDC) emulator. type: bool default: false site_costing: description: - Indicates whether a DFS namespace uses cost-based selection. - If a client cannot access a folder target in-site, a DFS namespace server selects the least resource intensive alternative. - If you provide a value of C(yes) for this parameter, DFS namespace favors high-speed links over wide area network (WAN) links. type: bool default: false target_failback: description: - Indicates whether a DFS namespace uses target failback. - If a client attempts to access a target on a server and that server is not available, the client fails over to another referral. - If this value is C(yes), once the first server becomes available again, the client fails back to the first server. - If this value is C(no), the DFS namespace server does not require the client to fail back to the preferred server. type: bool default: false ttl: description: - TTL interval, in seconds, for referrals. Clients store referrals to root targets for this length of time. type: int default: 300 seealso: - module: win_share - module: win_dfs_namespace_folder - module: win_dfs_replication_group author: - Marcin Kotarba <@mkot02> ''' RETURN = r''' msg: description: - if success: list of changes made by the module separated by semicolon - if failure: reason why module failed returned: always type: str ''' EXAMPLES = r''' - name: Create DFS namespace with SiteCosting option win_dfs_namespace_root: path: '\\domain.exmaple.com\dfs' targets: - '\\dc1.domain.exmaple.com\dfs' - '\\dc2.domain.exmaple.com\dfs' - '\\dc3.domain.exmaple.com\dfs' type: "DomainV2" description: "DFS Namespace" site_costing: true state: present - name: Remove DFS namespace win_dfs_namespace_root: path: '\\domain.exmaple.com\dfs' state: absent '''
# # PySNMP MIB module CISCO-RTTMON-IP-EXT-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/CISCO-RTTMON-IP-EXT-MIB # Produced by pysmi-0.3.4 at Wed May 1 12:11:15 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") ValueSizeConstraint, SingleValueConstraint, ConstraintsIntersection, ConstraintsUnion, ValueRangeConstraint = mibBuilder.importSymbols("ASN1-REFINEMENT", "ValueSizeConstraint", "SingleValueConstraint", "ConstraintsIntersection", "ConstraintsUnion", "ValueRangeConstraint") rttMonEchoPathAdminEntry, rttMonEchoAdminEntry, rttMonStatsCollectEntry, rttMonCtrlAdminEntry, rttMonLpdGrpStatsEntry, rttMonHistoryCollectionEntry = mibBuilder.importSymbols("CISCO-RTTMON-MIB", "rttMonEchoPathAdminEntry", "rttMonEchoAdminEntry", "rttMonStatsCollectEntry", "rttMonCtrlAdminEntry", "rttMonLpdGrpStatsEntry", "rttMonHistoryCollectionEntry") ciscoMgmt, = mibBuilder.importSymbols("CISCO-SMI", "ciscoMgmt") DscpOrAny, = mibBuilder.importSymbols("DIFFSERV-DSCP-TC", "DscpOrAny") InetAddress, InetAddressType = mibBuilder.importSymbols("INET-ADDRESS-MIB", "InetAddress", "InetAddressType") IPv6FlowLabelOrAny, = mibBuilder.importSymbols("IPV6-FLOW-LABEL-MIB", "IPv6FlowLabelOrAny") ModuleCompliance, ObjectGroup, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "ObjectGroup", "NotificationGroup") iso, Counter64, IpAddress, MibIdentifier, MibScalar, MibTable, MibTableRow, MibTableColumn, Unsigned32, ObjectIdentity, TimeTicks, Bits, Integer32, NotificationType, ModuleIdentity, Counter32, Gauge32 = mibBuilder.importSymbols("SNMPv2-SMI", "iso", "Counter64", "IpAddress", "MibIdentifier", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Unsigned32", "ObjectIdentity", "TimeTicks", "Bits", "Integer32", "NotificationType", "ModuleIdentity", "Counter32", "Gauge32") TextualConvention, DisplayString = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "DisplayString") ciscoRttMonIPExtMIB = ModuleIdentity((1, 3, 6, 1, 4, 1, 9, 9, 572)) ciscoRttMonIPExtMIB.setRevisions(('2006-08-02 00:00',)) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): if mibBuilder.loadTexts: ciscoRttMonIPExtMIB.setRevisionsDescriptions(('Initial version of this MIB module.',)) if mibBuilder.loadTexts: ciscoRttMonIPExtMIB.setLastUpdated('200608020000Z') if mibBuilder.loadTexts: ciscoRttMonIPExtMIB.setOrganization('Cisco Systems, Inc.') if mibBuilder.loadTexts: ciscoRttMonIPExtMIB.setContactInfo('Cisco Systems, Inc. Customer Service Postal: 170 W Tasman Drive San Jose, CA 95134 Tel: +1 800 553 NETS Email: [email protected]') if mibBuilder.loadTexts: ciscoRttMonIPExtMIB.setDescription('This MIB contains extensions to tables in CISCO-RTTMON-MIB to support IP-layer extensions, specifically IPv6 addresses and other information related to IPv6 and other IP information') crttMonIPExtObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 572, 1)) ciscoRttMonIPExtMibConformance = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 572, 2)) ciscoRttMonIPExtMibCompliances = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 572, 2, 1)) ciscoRttMonIPExtMibGroups = MibIdentifier((1, 3, 6, 1, 4, 1, 9, 9, 572, 2, 2)) crttMonIPEchoAdminTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 1), ) if mibBuilder.loadTexts: crttMonIPEchoAdminTable.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoAdminTable.setDescription('An extension of the rttMonEchoAdminTable, defined in the CISCO-RTTMON-MIB, which provides the additional capability of recording the addresses as IPv6 addresses, plus other IPv6 and IP layer extension information') crttMonIPEchoAdminEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 1, 1), ) rttMonEchoAdminEntry.registerAugmentions(("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPEchoAdminEntry")) crttMonIPEchoAdminEntry.setIndexNames(*rttMonEchoAdminEntry.getIndexNames()) if mibBuilder.loadTexts: crttMonIPEchoAdminEntry.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoAdminEntry.setDescription('A list of additional objects needed for IPv6 addresses.') crttMonIPEchoAdminTargetAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 1, 1, 1), InetAddressType().clone('unknown')).setMaxAccess("readwrite") if mibBuilder.loadTexts: crttMonIPEchoAdminTargetAddrType.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoAdminTargetAddrType.setDescription("An enumerated value which specifies the address type of the target. This object must be used along with the crttMonIPEchoAdminTargetAddress object as it identifies the address family of the address specified by that object. If the value of crttMonIPEchoAdminTargetAddress is a zero-length string (e.g., because an IPv4 address is specified by rttMonEchoAdminTargetAddress), this object contains the value 'unknown'.") crttMonIPEchoAdminTargetAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 1, 1, 2), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: crttMonIPEchoAdminTargetAddress.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoAdminTargetAddress.setDescription('A string which specifies the address of the target. This object, in conjunction with the crttMonIPEchoAdminTargetAddrType object, may be used to specify either an IPv6 or an IPv4 address and is an alternative to the rttMonEchoAdminTargetAddress object, which may only specify an IPv4 address. In case the target is a V4 IP address then both crttMonIPEchoAdminTargetAddrType/ crttMonIPEchoAdminTargetAddress AND rttMonEchoAdminTargetAddress may be used to specify it so long as both try to specify the same V4 IP address. Alternatively only one of rttMonEchoAdminTargetAddress OR crttMonIPEchoAdminTargetAddrType/ crttMonIPEchoAdminTargetAddress may be used to specify the V4 IP address, in which case the other may either not be instantiated or contain a zero length string. In case the the target is a V6 IP address then only crttMonIPEchoAdminTargetAddrType/ crttMonIPEchoAdminTargetAddress must be used and rttMonEchoAdminTargetAddress may not be instantiated or may have a zero length string.') crttMonIPEchoAdminSourceAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 1, 1, 3), InetAddressType().clone('unknown')).setMaxAccess("readwrite") if mibBuilder.loadTexts: crttMonIPEchoAdminSourceAddrType.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoAdminSourceAddrType.setDescription("An enumerated value which specifies the address type of the source. This object must be used along with the crttMonIPEchoAdminSourceAddress object as it identifies the address family of the address specified by that object. If the value of crttMonIPEchoAdminSourceAddress is a zero-length string (e.g., because an IPv4 address is specified by rttMonEchoAdminSourceAddress), this object contains the value 'unknown'.") crttMonIPEchoAdminSourceAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 1, 1, 4), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: crttMonIPEchoAdminSourceAddress.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoAdminSourceAddress.setDescription('A string which specifies the address of the target. This object, together with the crttMonIPEchoAdminSourceAddrType object, may be used to specify either an IPv6 or an IPv4 address and is an alternative to the rttMonEchoAdminSourceAddress object, which may only specify an IPv4 address. In case the target is a V4 IP address then both crttMonIPEchoAdminSourceAddrType/ crttMonIPEchoAdminSourceAddress AND rttMonEchoAdminSourceAddress may be used to specify it so long as both try to specify the same V4 IP address. Alternatively only one of rttMonEchoAdminSourceAddress OR crttMonIPEchoAdminSourceAddrType/ crttMonIPEchoAdminSourceAddress may be used to specify the V4 IP address, in which case the other may either not be instantiated or contain a zero length string. In case the the target is a V6 IP address then only crttMonIPEchoAdminSourceAddrType/ crttMonIPEchoAdminSourceAddress must be used and rttMonEchoAdminSourceAddress may not be instantiated or may have a zero length string.') crttMonIPEchoAdminNameServerAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 1, 1, 5), InetAddressType().clone('unknown')).setMaxAccess("readwrite") if mibBuilder.loadTexts: crttMonIPEchoAdminNameServerAddrType.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoAdminNameServerAddrType.setDescription("An enumerated value which specifies the address type of the target. This object must be used along with the crttMonIPEchoAdminNameServerAddress object as it identifies the address family of the address specified by that object. If the value of crttMonIPEchoAdminNameServerAddress is a zero-length string (e.g., because an IPv4 address is specified by rttMonEchoAdminNameServer), this object contains the value 'unknown'.") crttMonIPEchoAdminNameServerAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 1, 1, 6), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: crttMonIPEchoAdminNameServerAddress.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoAdminNameServerAddress.setDescription('A string which specifies the address of the target. This object, together with the crttMonIPEchoAdminNameServerAddrType object, may be used to specify either an IPv6 or an IPv4 address and is an alternative to the rttMonEchoAdminNameServer object, which can only specify an IPv4. In case the target is a V4 IP address then both crttMonIPEchoAdminNameServerAddrType/ crttMonIPEchoAdminNameServerAddress AND rttMonEchoAdminNameServer may be used to specify it so long as both try to specify the same V4 IP address. Alternatively only one of rttMonEchoAdminNameServer OR crttMonIPEchoAdminNameServerAddrType/ crttMonIPEchoAdminNameServerAddress may be used to specify the V4 IP address, in which case the other may either not be instantiated or contain a zero length string. In case the the target is a V6 IP address then only crttMonIPEchoAdminNameServerAddrType/ crttMonIPEchoAdminNameServerAddress must be used and rttMonEchoAdminNameServer may not be instantiated or may have a zero length string.') crttMonIPEchoAdminLSPSelAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 1, 1, 7), InetAddressType().clone('unknown')).setMaxAccess("readwrite") if mibBuilder.loadTexts: crttMonIPEchoAdminLSPSelAddrType.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoAdminLSPSelAddrType.setDescription("An enumerated value which specifies the address type of the target. This object must be used along with the crttMonIPEchoAdminLSPSelAddress object as it identifies the address family of the address specified by that object. If the value of crttMonIPEchoAdminLSPSelAddress is a zero-length string (e.g., because an IPv4 address is specified by rttMonEchoAdminLSPSelector), this object contains the value 'unknown'.") crttMonIPEchoAdminLSPSelAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 1, 1, 8), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: crttMonIPEchoAdminLSPSelAddress.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoAdminLSPSelAddress.setDescription('A string which specifies the address of the LSP Selector. This object, in conjunction with the crttMonIPEchoAdminLSPSelAddrType object, may be used to specify either an IPv6 or an IPv4 address and is an alternative to the rttMonEchoAdminLSPSelector object, which can only specify an IPv4 address.In case the target is a V4 IP address then both crttMonIPEchoAdminLSPSelAddrType/ crttMonIPEchoAdminLSPSelAddress AND rttMonEchoAdminLSPSelector may be used to specify it so long as both try to specify the same V4 IP address. Alternatively only one of rttMonEchoAdminLSPSelector OR crttMonIPEchoAdminLSPSelAddrType/ crttMonIPEchoAdminLSPSelAddress may be used to specify the V4 IP address, in which case the other may either not be instantiated or contain a zero length string. In case the the target is a V6 IP address then only crttMonIPEchoAdminLSPSelAddrType/ crttMonIPEchoAdminLSPSelAddress must be used and rttMonEchoAdminLSPSelector may not be instantiated or may have a zero length string.') crttMonIPEchoAdminDscp = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 1, 1, 9), DscpOrAny().clone(-1)).setMaxAccess("readwrite") if mibBuilder.loadTexts: crttMonIPEchoAdminDscp.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoAdminDscp.setDescription('The DSCP value (either an IPv4 TOS octet or an IPv6 Traffic Class octet) to be set in outgoing packets.') crttMonIPEchoAdminFlowLabel = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 1, 1, 10), IPv6FlowLabelOrAny()).setMaxAccess("readwrite") if mibBuilder.loadTexts: crttMonIPEchoAdminFlowLabel.setReference('Section 6 of RFC 2460') if mibBuilder.loadTexts: crttMonIPEchoAdminFlowLabel.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoAdminFlowLabel.setDescription('The Flow Label in an IPv6 packet header.') crttMonIPLatestRttOperTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 2), ) if mibBuilder.loadTexts: crttMonIPLatestRttOperTable.setStatus('current') if mibBuilder.loadTexts: crttMonIPLatestRttOperTable.setDescription('An extension of the rttMonLatestRttOperTable, defined in the CISCO-RTTMON-MIB, which provides the additional capability of specifying IPv6 addresses.') crttMonIPLatestRttOperEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 2, 1), ) rttMonCtrlAdminEntry.registerAugmentions(("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPLatestRttOperEntry")) crttMonIPLatestRttOperEntry.setIndexNames(*rttMonCtrlAdminEntry.getIndexNames()) if mibBuilder.loadTexts: crttMonIPLatestRttOperEntry.setStatus('current') if mibBuilder.loadTexts: crttMonIPLatestRttOperEntry.setDescription('A list of objects required to support IPv6 addresses. ') crttMonIPLatestRttOperAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 2, 1, 1), InetAddressType().clone('unknown')).setMaxAccess("readcreate") if mibBuilder.loadTexts: crttMonIPLatestRttOperAddressType.setStatus('current') if mibBuilder.loadTexts: crttMonIPLatestRttOperAddressType.setDescription("An enumerated value which specifies the address type of the target. This object must be used along with the crttMonIPLatestRttOperAddress object as it identifies the address family of the address specified by that object. If the value of crttMonIPLatestRttOperAddress is a zero-length string (e.g., because an IPv4 address is specified by rttMonLatestRttOperAddress), this object contains the value 'unknown'.") crttMonIPLatestRttOperAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 2, 1, 2), InetAddress()).setMaxAccess("readcreate") if mibBuilder.loadTexts: crttMonIPLatestRttOperAddress.setStatus('current') if mibBuilder.loadTexts: crttMonIPLatestRttOperAddress.setDescription('A string which specifies the address of the target. This object, together with the crttMonIPLatestRttOperAddressType object, may be used to specify either an IPv6 or an IPv4 address and is an alternative to the rttMonLatestRttOperAddress object, which can only specify an IPv4 address. In case the target is a V4 IP address then both crttMonIPLatestRttOperAddressType/ crttMonIPLatestRttOperAddress AND rttMonLatestRttOperAddress may be used to specify it so long as both try to specify the same V4 IP address. Alternatively only one of rttMonLatestRttOperAddress OR crttMonIPLatestRttOperAddressType/ crttMonIPLatestRttOperAddress may be used to specify the V4 IP address, in which case the other may either not be instantiated or contain a zero length string. In case the the target is a V6 IP address then only crttMonIPLatestRttOperAddressType/ crttMonIPLatestRttOperAddress must be used and rttMonLatestRttOperAddress may not be instantiated or may have a zero length string.') crttMonIPEchoPathAdminTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 3), ) if mibBuilder.loadTexts: crttMonIPEchoPathAdminTable.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoPathAdminTable.setDescription('An extension of the rttMonEchoPathAdminTable, defined in the CISCO-RTTMON-MIB, which provides the additional capability of recording the hops as IPv6 addresses.') crttMonIPEchoPathAdminEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 3, 1), ) rttMonEchoPathAdminEntry.registerAugmentions(("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPEchoPathAdminEntry")) crttMonIPEchoPathAdminEntry.setIndexNames(*rttMonEchoPathAdminEntry.getIndexNames()) if mibBuilder.loadTexts: crttMonIPEchoPathAdminEntry.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoPathAdminEntry.setDescription('A list of additional objects needed for IPv6 addresses.') crttMonIPEchoPathAdminHopAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 3, 1, 1), InetAddressType().clone('unknown')).setMaxAccess("readwrite") if mibBuilder.loadTexts: crttMonIPEchoPathAdminHopAddrType.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoPathAdminHopAddrType.setDescription("An enumerated value which specifies the address type of the hop. This object must be used along with the crttMonIPEchoPathAdminHopAddress object as it identifies the address family of the address specified by that object. If the value of crttMonIPEchoPathAdminHopAddress is a zero-length string (e.g., because an IPv4 address is specified by rttMonEchoPathAdminHopAddress), this object contains the value 'unknown'.") crttMonIPEchoPathAdminHopAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 3, 1, 2), InetAddress()).setMaxAccess("readwrite") if mibBuilder.loadTexts: crttMonIPEchoPathAdminHopAddress.setStatus('current') if mibBuilder.loadTexts: crttMonIPEchoPathAdminHopAddress.setDescription('A string which specifies the address of the hop. This object, together with the crttMonIPEchoPathAdminHopAddrType object, may be used to specify either an IPv6 or an IPv4 address and is an alternative to the rttMonEchoPathAdminHopAddress object, which can only specify an IPv4 address. In case the target is a V4 IP address then both crttMonIPEchoPathAdminHopAddrType/ crttMonIPEchoPathAdminHopAddress AND rttMonEchoPathAdminHopAddress may be used to specify it so long as both try to specify the same V4 IP address. Alternatively only one of rttMonEchoPathAdminHopAddress OR crttMonIPEchoPathAdminHopAddrType/ crttMonIPEchoPathAdminHopAddress may be used to specify the V4 IP address, in which case the other may either not be instantiated or contain a zero length string. In case the the target is a V6 IP address then only crttMonIPEchoPathAdminHopAddrType/ crttMonIPEchoPathAdminHopAddress must be used and rttMonEchoPathAdminHopAddress may not be instantiated or may have a zero length string.') crttMonIPStatsCollectTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 4), ) if mibBuilder.loadTexts: crttMonIPStatsCollectTable.setStatus('current') if mibBuilder.loadTexts: crttMonIPStatsCollectTable.setDescription('An extension of the rttMonStatsCollectTable, defined in the CISCO-RTTMON-MIB, which provides the additional capability of specifying the collection address as an IPv6 address.') crttMonIPStatsCollectEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 4, 1), ) rttMonStatsCollectEntry.registerAugmentions(("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPStatsCollectEntry")) crttMonIPStatsCollectEntry.setIndexNames(*rttMonStatsCollectEntry.getIndexNames()) if mibBuilder.loadTexts: crttMonIPStatsCollectEntry.setStatus('current') if mibBuilder.loadTexts: crttMonIPStatsCollectEntry.setDescription('A list of additional objects needed for IPv6 addresses.') crttMonIPStatsCollectAddressType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 4, 1, 1), InetAddressType().clone('unknown')).setMaxAccess("readonly") if mibBuilder.loadTexts: crttMonIPStatsCollectAddressType.setStatus('current') if mibBuilder.loadTexts: crttMonIPStatsCollectAddressType.setDescription("An enumerated value which specifies the address type of the target. This object must be used along with the crttMonIPStatsCollectAddress object as it identifies the address family of the address specified by that object. If the value of crttMonIPStatsCollectAddress is a zero-length string (e.g., because an IPv4 address is specified by rttMonStatsCollectAddress), this object contains the value 'unknown'.") crttMonIPStatsCollectAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 4, 1, 2), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: crttMonIPStatsCollectAddress.setStatus('current') if mibBuilder.loadTexts: crttMonIPStatsCollectAddress.setDescription('A string which specifies the address of the collection target. This object, in conjunction with the crttMonIPStatsCollectAddressType object, may be used to specify either an IPv6 or an IPv4 address and is an alternative to the rttMonStatsCollectAddress object, which can only specify an IPv4 address. In case the target is a V4 IP address then both crttMonIPStatsCollectAddressType/ crttMonIPStatsCollectAddress AND rttMonStatsCollectAddress may be used to specify it so long as both try to specify the same V4 IP address. Alternatively only one of rttMonStatsCollectAddress OR crttMonIPStatsCollectAddressType/ crttMonIPStatsCollectAddress may be used to specify the V4 IP address, in which case the other may either not be instantiated or contain a zero length string. In case the the target is a V6 IP address then only crttMonIPStatsCollectAddressType/ crttMonIPStatsCollectAddress must be used and rttMonStatsCollectAddress may not be instantiated or may have a zero length string.') crttMonIPLpdGrpStatsTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 5), ) if mibBuilder.loadTexts: crttMonIPLpdGrpStatsTable.setStatus('current') if mibBuilder.loadTexts: crttMonIPLpdGrpStatsTable.setDescription('An extension of the rttMonLpdGrpStatsTable, defined in the CISCO-RTTMON-MIB, which provides the additional capability of specifying the target PE address as an IPv6 address.') crttMonIPLpdGrpStatsEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 5, 1), ) rttMonLpdGrpStatsEntry.registerAugmentions(("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPLpdGrpStatsEntry")) crttMonIPLpdGrpStatsEntry.setIndexNames(*rttMonLpdGrpStatsEntry.getIndexNames()) if mibBuilder.loadTexts: crttMonIPLpdGrpStatsEntry.setStatus('current') if mibBuilder.loadTexts: crttMonIPLpdGrpStatsEntry.setDescription('A list of additional objects needed for IPv6 addresses.') crttMonIPLpdGrpStatsTargetPEAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 5, 1, 1), InetAddressType().clone('unknown')).setMaxAccess("readonly") if mibBuilder.loadTexts: crttMonIPLpdGrpStatsTargetPEAddrType.setStatus('current') if mibBuilder.loadTexts: crttMonIPLpdGrpStatsTargetPEAddrType.setDescription("An enumerated value which specifies the address type of the target. This object must be used along with the crttMonIPLpdGrpStatsTargetPEAddr object as it identifies the address family of the address specified by that object. If the value of crttMonIPLpdGrpStatsTargetPEAddr is a zero-length string (e.g., because an IPv4 address is specified by rttMonLpdGrpStatsTargetPE), this object contains the value 'unknown'.") crttMonIPLpdGrpStatsTargetPEAddr = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 5, 1, 2), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: crttMonIPLpdGrpStatsTargetPEAddr.setStatus('current') if mibBuilder.loadTexts: crttMonIPLpdGrpStatsTargetPEAddr.setDescription('A string which specifies the address of the target PE. This object, in conjunction with the crttMonIPLpdGrpStatsTargetPEAddrType object, may be used to specify either an IPv6 or an IPv4 address and is an alternative to the rttMonLpdGrpStatsTargetPE object, which can only specify an IPv4 address. In case the target is a V4 IP address then both crttMonIPLpdGrpStatsTargetPEAddrType/ crttMonIPLpdGrpStatsTargetPEAddr AND rttMonLpdGrpStatsTargetPE may be used to specify it so long as both try to specify the same V4 IP address. Alternatively only one of rttMonLpdGrpStatsTargetPE OR crttMonIPLpdGrpStatsTargetPEAddrType/ crttMonIPLpdGrpStatsTargetPEAddr may be used to specify the V4 IP address, in which case the other may either not be instantiated or contain a zero length string. In case the the target is a V6 IP address then only crttMonIPLpdGrpStatsTargetPEAddrType/ crttMonIPLpdGrpStatsTargetPEAddr must be used and rttMonLpdGrpStatsTargetPE may not be instantiated or may have a zero length string.') crttMonIPHistoryCollectionTable = MibTable((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 6), ) if mibBuilder.loadTexts: crttMonIPHistoryCollectionTable.setStatus('current') if mibBuilder.loadTexts: crttMonIPHistoryCollectionTable.setDescription('An extension of the rttMonHistoryCollectionTable, defined in the CISCO-RTTMON-MIB, which provides the additional capability of specifying the target address as an IPv6 address.') crttMonIPHistoryCollectionEntry = MibTableRow((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 6, 1), ) rttMonHistoryCollectionEntry.registerAugmentions(("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPHistoryCollectionEntry")) crttMonIPHistoryCollectionEntry.setIndexNames(*rttMonHistoryCollectionEntry.getIndexNames()) if mibBuilder.loadTexts: crttMonIPHistoryCollectionEntry.setStatus('current') if mibBuilder.loadTexts: crttMonIPHistoryCollectionEntry.setDescription('A list of additional objects needed for IPv6 addresses.') crttMonIPHistoryCollectionAddrType = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 6, 1, 1), InetAddressType().clone('unknown')).setMaxAccess("readonly") if mibBuilder.loadTexts: crttMonIPHistoryCollectionAddrType.setStatus('current') if mibBuilder.loadTexts: crttMonIPHistoryCollectionAddrType.setDescription("An enumerated value which specifies the address type of the target. This object must be used along with the crttMonIPHistoryCollectionAddress object as it identifies the address family of the address specified by that object. If the value of crttMonIPHistoryCollectionAddress is a zero-length string (e.g., because an IPv4 address is specified by rttMonHistoryCollectionAddress), this object contains the value 'unknown'.") crttMonIPHistoryCollectionAddress = MibTableColumn((1, 3, 6, 1, 4, 1, 9, 9, 572, 1, 6, 1, 2), InetAddress()).setMaxAccess("readonly") if mibBuilder.loadTexts: crttMonIPHistoryCollectionAddress.setStatus('current') if mibBuilder.loadTexts: crttMonIPHistoryCollectionAddress.setDescription('A string which specifies the address of the target. This object, in conjunction with the crttMonIPHistoryCollectionAddrType object, may be used to specify either an IPv6 or an IPv4 address and is an alternative to the rttMonHistoryCollectionAddress object, which can only specify an IPv4 address. In case the target is a V4 IP address then both crttMonIPHistoryCollectionAddrType/ crttMonIPHistoryCollectionAddress AND rttMonHistoryCollectionAddress may be used to specify it so long as both try to specify the same V4 IP address. Alternatively only one of rttMonHistoryCollectionAddress OR crttMonIPHistoryCollectionAddrType/ crttMonIPHistoryCollectionAddress may be used to specify the V4 IP address, in which case the other may either not be instantiated or contain a zero length string. In case the the target is a V6 IP address then only crttMonIPHistoryCollectionAddrType/ crttMonIPHistoryCollectionAddress must be used and rttMonHistoryCollectionAddress may not be instantiated or may have a zero length string.') ciscoRttMonIPExtMibComplianceRev1 = ModuleCompliance((1, 3, 6, 1, 4, 1, 9, 9, 572, 2, 1, 1)).setObjects(("CISCO-RTTMON-IP-EXT-MIB", "ciscoIPExtCtrlGroupRev1")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoRttMonIPExtMibComplianceRev1 = ciscoRttMonIPExtMibComplianceRev1.setStatus('current') if mibBuilder.loadTexts: ciscoRttMonIPExtMibComplianceRev1.setDescription('The compliance statement for new MIB extensions for supporting IPv6 addresses and other IP-layer extensions') ciscoIPExtCtrlGroupRev1 = ObjectGroup((1, 3, 6, 1, 4, 1, 9, 9, 572, 2, 2, 1)).setObjects(("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPEchoAdminTargetAddrType"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPEchoAdminTargetAddress"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPEchoAdminSourceAddrType"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPEchoAdminSourceAddress"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPEchoAdminNameServerAddrType"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPEchoAdminNameServerAddress"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPEchoAdminLSPSelAddrType"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPEchoAdminLSPSelAddress"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPEchoAdminDscp"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPEchoAdminFlowLabel"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPLatestRttOperAddressType"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPLatestRttOperAddress"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPEchoPathAdminHopAddrType"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPEchoPathAdminHopAddress"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPStatsCollectAddressType"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPStatsCollectAddress"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPLpdGrpStatsTargetPEAddrType"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPLpdGrpStatsTargetPEAddr"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPHistoryCollectionAddrType"), ("CISCO-RTTMON-IP-EXT-MIB", "crttMonIPHistoryCollectionAddress")) if getattr(mibBuilder, 'version', (0, 0, 0)) > (4, 4, 0): ciscoIPExtCtrlGroupRev1 = ciscoIPExtCtrlGroupRev1.setStatus('current') if mibBuilder.loadTexts: ciscoIPExtCtrlGroupRev1.setDescription('A collection of objects that were added to enhance the functionality of the RTT application to support other IP layer extensions like IPv6, specifically IPv6 addresses and other information.') mibBuilder.exportSymbols("CISCO-RTTMON-IP-EXT-MIB", crttMonIPHistoryCollectionAddrType=crttMonIPHistoryCollectionAddrType, crttMonIPLatestRttOperTable=crttMonIPLatestRttOperTable, crttMonIPStatsCollectAddress=crttMonIPStatsCollectAddress, crttMonIPEchoAdminLSPSelAddress=crttMonIPEchoAdminLSPSelAddress, ciscoIPExtCtrlGroupRev1=ciscoIPExtCtrlGroupRev1, crttMonIPLatestRttOperAddressType=crttMonIPLatestRttOperAddressType, crttMonIPLpdGrpStatsTable=crttMonIPLpdGrpStatsTable, crttMonIPEchoAdminFlowLabel=crttMonIPEchoAdminFlowLabel, crttMonIPEchoPathAdminTable=crttMonIPEchoPathAdminTable, crttMonIPEchoPathAdminHopAddrType=crttMonIPEchoPathAdminHopAddrType, crttMonIPEchoAdminNameServerAddrType=crttMonIPEchoAdminNameServerAddrType, crttMonIPHistoryCollectionTable=crttMonIPHistoryCollectionTable, crttMonIPHistoryCollectionAddress=crttMonIPHistoryCollectionAddress, ciscoRttMonIPExtMibGroups=ciscoRttMonIPExtMibGroups, crttMonIPLatestRttOperEntry=crttMonIPLatestRttOperEntry, crttMonIPEchoPathAdminEntry=crttMonIPEchoPathAdminEntry, crttMonIPExtObjects=crttMonIPExtObjects, crttMonIPLpdGrpStatsTargetPEAddr=crttMonIPLpdGrpStatsTargetPEAddr, ciscoRttMonIPExtMIB=ciscoRttMonIPExtMIB, crttMonIPStatsCollectTable=crttMonIPStatsCollectTable, crttMonIPEchoAdminTable=crttMonIPEchoAdminTable, crttMonIPEchoAdminSourceAddrType=crttMonIPEchoAdminSourceAddrType, crttMonIPLpdGrpStatsEntry=crttMonIPLpdGrpStatsEntry, ciscoRttMonIPExtMibCompliances=ciscoRttMonIPExtMibCompliances, crttMonIPEchoAdminTargetAddrType=crttMonIPEchoAdminTargetAddrType, crttMonIPHistoryCollectionEntry=crttMonIPHistoryCollectionEntry, PYSNMP_MODULE_ID=ciscoRttMonIPExtMIB, crttMonIPEchoAdminLSPSelAddrType=crttMonIPEchoAdminLSPSelAddrType, ciscoRttMonIPExtMibConformance=ciscoRttMonIPExtMibConformance, crttMonIPStatsCollectEntry=crttMonIPStatsCollectEntry, crttMonIPStatsCollectAddressType=crttMonIPStatsCollectAddressType, crttMonIPEchoAdminEntry=crttMonIPEchoAdminEntry, crttMonIPEchoAdminTargetAddress=crttMonIPEchoAdminTargetAddress, crttMonIPLatestRttOperAddress=crttMonIPLatestRttOperAddress, ciscoRttMonIPExtMibComplianceRev1=ciscoRttMonIPExtMibComplianceRev1, crttMonIPEchoAdminDscp=crttMonIPEchoAdminDscp, crttMonIPLpdGrpStatsTargetPEAddrType=crttMonIPLpdGrpStatsTargetPEAddrType, crttMonIPEchoAdminSourceAddress=crttMonIPEchoAdminSourceAddress, crttMonIPEchoAdminNameServerAddress=crttMonIPEchoAdminNameServerAddress, crttMonIPEchoPathAdminHopAddress=crttMonIPEchoPathAdminHopAddress)
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Copyright 2020, Yutong Xie, UIUC. Using random index to shuffle an array ''' class Solution(object): def search(self, nums, target): """ :type nums: List[int] :type target: int :rtype: int """ l, r = 0, len(nums)-1 while l <= r: mid = (l+r)//2 if target == nums[mid]: return mid # non rotated array if nums[mid] >= nums[l]: if target < nums[mid] and target >= nums[l]: r = mid - 1 else: l = mid + 1 # nums[mid] < nums[l]: rotated array else: if target <= nums[r] and target > nums[mid]: l = mid + 1 else: r = mid - 1 return -1
#!/usr/bin/env python # -*- coding: utf-8 -*- # This software is under a BSD license. See LICENSE.txt for details. def dt_writer(obj): """Check to ensure conformance to dt_writer protocol. :returns: ``True`` if the object implements the required methods """ return hasattr(obj, "__dt_type__") and hasattr(obj, "__dt_write__") class DTPyWrite(object): """Class documenting methods that must be implemented for DTDataFile to load complex types by name. This is never instantiated directly. :class:`datatank_py.DTDataFile.DTDataFile` checks to ensure that an object implements all of the required methods, but you are not required to use :class:`DTPyWrite` as a base class. It's mainly provided as a convenience and formal documentation. """ def __dt_type__(self): """The variable type as required by DataTank. :returns: variable type as a string This is a string description of the variable, which can be found in the DataTank manual PDF or in DTSource. It's easiest to look in DTSource, since you'll need to look there for the :meth:`__dt_write__` implementation anyway. You can find the type in the ``WriteOne()`` function for a particular class, such as: .. code-block:: cpp // this is taken from DTPath2D.cpp void WriteOne(DTDataStorage &output,const string &name,const DTPath2D &toWrite) { Write(output,name,toWrite); Write(output,"Seq_"+name,"2D Path"); output.Flush(); } where the type is the string "2D Path". In some cases, it seems that multiple type names are recognized; e.g., "StringList" is written by DataTank, but "List of Strings" is used in DTSource. Regardless, this is trivial; the :meth:`datatank_py.DTPath2D.DTPath2D.__dt_type__` method looks like this:: def __dt_type__(self): return "2D Path" """ raise NotImplementedError("This method is required") def __dt_write__(self, datafile, name): """Write all associated values to a file. :param datafile: a :class:`datatank_py.DTDataFile.DTDataFile` instance :param name: the name of the variable as it should appear in DataTank This method collects the necessary components of the compound object and writes them to the datafile. The name is generally used as a base for associated variable names, since only one of the components can have the "primary" name. Again, the DataTank manual PDF or DTSource must be used here as a reference (DTSource is more complete). In particular, you need to look at the ``Write()`` function implemented in the C++ class: .. code-block:: cpp // this is taken from DTPath2D.cpp void Write(DTDataStorage &output,const string &name,const DTPath2D &thePath) { Write(output,name+"_bbox2D",BoundingBox(thePath)); Write(output,name,thePath.Data()); } Here the bounding box is written as `name_bbox2D`; this is just a 4 element double-precision array. Next, the actual path array is saved under the name as passed in to the function. The equivalent Python implementation is:: def __dt_write__(self, datafile, name): datafile.write_anonymous(self.bounding_box(), name + "_bbox2D") datafile.write_anonymous(np.dstack((self._xvalues, self._yvalues)), name) Note that :meth:`datatank_py.DTDataFile.DTDataFile.write_anonymous` should be used in order to avoid any variable name munging (prepending "Seq\_" in order to make the variable visible in DataTank). """ raise NotImplementedError("This method is required") @classmethod def from_data_file(self, datafile, name): """Instantiate a :mod:`datatank_py` high-level object from a file. :param datafile: a :class:`datatank_py.DTDataFile.DTDataFile` instance :param name: the name of the variable :returns: a properly initialized instance of the calling class This class method can be implemented to read necessary components of an object from a datafile. For example:: from datatank_py.DTPath2D import DTPath2D from datatank_py.DTDataFile import DTDataFile with DTDataFile("Input.dtbin") as df: path = DTPath2D.from_data_file(df, "My Path") will try to create a :class:`datatank_py.DTPath2D.DTPath2D` from variables named "My Path" in the given data file. In general, this is the inverse of the :meth:`__dt_write__` method, but may be slightly more tricky due to naming conventions in DataTank and optional data that DataTank may or may not include. """ raise NotImplementedError("Optional read method is not implemented")
# # PySNMP MIB module Argus-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Argus-MIB # Produced by pysmi-0.3.4 at Wed May 1 11:33:18 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # Integer, ObjectIdentifier, OctetString = mibBuilder.importSymbols("ASN1", "Integer", "ObjectIdentifier", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueRangeConstraint, ConstraintsUnion, ValueSizeConstraint, ConstraintsIntersection = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ConstraintsUnion", "ValueSizeConstraint", "ConstraintsIntersection") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") MibScalar, MibTable, MibTableRow, MibTableColumn, ModuleIdentity, ObjectIdentity, NotificationType, Integer32, Counter32, Gauge32, Unsigned32, Counter64, TimeTicks, IpAddress, enterprises, MibIdentifier, Bits, iso = mibBuilder.importSymbols("SNMPv2-SMI", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "ModuleIdentity", "ObjectIdentity", "NotificationType", "Integer32", "Counter32", "Gauge32", "Unsigned32", "Counter64", "TimeTicks", "IpAddress", "enterprises", "MibIdentifier", "Bits", "iso") DisplayString, TextualConvention = mibBuilder.importSymbols("SNMPv2-TC", "DisplayString", "TextualConvention") argus = ModuleIdentity((1, 3, 6, 1, 4, 1, 7309)) if mibBuilder.loadTexts: argus.setLastUpdated('200811030000Z') if mibBuilder.loadTexts: argus.setOrganization('Argus Technologies') if mibBuilder.loadTexts: argus.setContactInfo(' Randy Dahlgren Postal: Argus Technologies 5700 Sidley Street Vancouver, BC V5J 5E5 Canada Tel: 1-604-436-5900 Fax: 1-604-436-1233 E-mail: [email protected]') if mibBuilder.loadTexts: argus.setDescription('This MIB defines the information block(s) available in system controllers as defined by the following list: - dcPwrSysDevice: the SM-series of controllers') dcpower = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4)) dcPwrSysDevice = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1)) dcPwrSysVariable = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 1)) dcPwrSysString = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 2)) dcPwrSysTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 3)) dcPwrSysOutputsTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4)) dcPwrSysRelayTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 1)) dcPwrSysAnalogOpTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 2)) dcPwrSysAlrmsTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5)) dcPwrSysRectAlrmTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 1)) dcPwrSysDigAlrmTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 2)) dcPwrSysCurrAlrmTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 3)) dcPwrSysVoltAlrmTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 4)) dcPwrSysBattAlrmTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 5)) dcPwrSysTempAlrmTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 6)) dcPwrSysCustomAlrmTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 7)) dcPwrSysMiscAlrmTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 8)) dcPwrSysCtrlAlrmTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 9)) dcPwrSysAdioAlrmTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 10)) dcPwrSysConvAlrmTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 11)) dcPwrSysInputsTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6)) dcPwrSysDigIpTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 1)) dcPwrSysCntrlrIpTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 2)) dcPwrSysRectIpTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 3)) dcPwrSysCustomIpTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 4)) dcPwrSysConvIpTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 5)) dcPwrSysTimerIpTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 6)) dcPwrSysCounterIpTbl = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 7)) dcPwrExternalControls = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 8)) dcPwrVarbindNameReference = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 9)) dcPwrSysChargeVolts = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysChargeVolts.setStatus('current') if mibBuilder.loadTexts: dcPwrSysChargeVolts.setDescription('Battery Charge Voltage. The integer value represent a two digit fix decimal (Value = real voltage * 100) in Volt') dcPwrSysDischargeVolts = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 1, 2), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysDischargeVolts.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDischargeVolts.setDescription('Battery Discharge Voltage. The integer value represent a two digit fix decimal (Value = real voltage * 100) in Volt') dcPwrSysChargeAmps = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysChargeAmps.setStatus('current') if mibBuilder.loadTexts: dcPwrSysChargeAmps.setDescription('Battery Charge Current. The integer value represent a two digit fix decimal (Value = real current * 100) in Amp') dcPwrSysDischargeAmps = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysDischargeAmps.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDischargeAmps.setDescription('Battery Discharge Current. The integer value represent a two digit fix decimal (Value = real current * 100) in Amp') dcPwrSysMajorAlarm = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysMajorAlarm.setStatus('current') if mibBuilder.loadTexts: dcPwrSysMajorAlarm.setDescription('Major Alarm') dcPwrSysMinorAlarm = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 1, 6), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysMinorAlarm.setStatus('current') if mibBuilder.loadTexts: dcPwrSysMinorAlarm.setDescription('Minor Alarm') dcPwrSysSiteName = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 2, 1), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysSiteName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysSiteName.setDescription('Site Name') dcPwrSysSiteCity = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 2, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysSiteCity.setStatus('current') if mibBuilder.loadTexts: dcPwrSysSiteCity.setDescription('Site City') dcPwrSysSiteRegion = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 2, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysSiteRegion.setStatus('current') if mibBuilder.loadTexts: dcPwrSysSiteRegion.setDescription('Site Region') dcPwrSysSiteCountry = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 2, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysSiteCountry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysSiteCountry.setDescription('Site Country') dcPwrSysContactName = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 2, 5), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysContactName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysContactName.setDescription('Contact Name') dcPwrSysPhoneNumber = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 2, 6), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysPhoneNumber.setStatus('current') if mibBuilder.loadTexts: dcPwrSysPhoneNumber.setDescription('Phone Number') dcPwrSysSiteNumber = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 2, 7), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysSiteNumber.setStatus('current') if mibBuilder.loadTexts: dcPwrSysSiteNumber.setDescription('Site Number') dcPwrSysSystemType = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 2, 8), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysSystemType.setStatus('current') if mibBuilder.loadTexts: dcPwrSysSystemType.setDescription('The type of system being monitored by the agent') dcPwrSysSystemSerial = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 2, 9), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysSystemSerial.setStatus('current') if mibBuilder.loadTexts: dcPwrSysSystemSerial.setDescription('The serial number of the monitored system') dcPwrSysSystemNumber = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 2, 10), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysSystemNumber.setStatus('current') if mibBuilder.loadTexts: dcPwrSysSystemNumber.setDescription('The number of the monitored system') dcPwrSysSoftwareVersion = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 2, 11), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysSoftwareVersion.setStatus('current') if mibBuilder.loadTexts: dcPwrSysSoftwareVersion.setDescription('The version of software running on the monitored system') dcPwrSysSoftwareTimestamp = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 2, 12), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysSoftwareTimestamp.setStatus('current') if mibBuilder.loadTexts: dcPwrSysSoftwareTimestamp.setDescription('The time stamp of the software running on the monitored system') dcPwrSysRelayCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRelayCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRelayCount.setDescription('Number of relay variables in system controller relay table') dcPwrSysRelayTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 1, 2), ) if mibBuilder.loadTexts: dcPwrSysRelayTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRelayTable.setDescription('A table of DC power system controller rectifier relay output variables') dcPwrSysRelayEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 1, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysRelayIndex")) if mibBuilder.loadTexts: dcPwrSysRelayEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRelayEntry.setDescription('An entry into the DC power system controller relay output group') dcPwrSysRelayIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRelayIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRelayIndex.setDescription('The index of the relay variable in the power system controller relay output group') dcPwrSysRelayName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 1, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRelayName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRelayName.setDescription('The description of the relay variable as reported by the DC power system controller relay output group') dcPwrSysRelayIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRelayIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRelayIntegerValue.setDescription('The integer value of the relay variable as reported by the DC power system controller relay output group') dcPwrSysRelayStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 1, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRelayStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRelayStringValue.setDescription('The string value of the relay variable as reported by the DC power system controller relay output group') dcPwrSysRelaySeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRelaySeverity.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRelaySeverity.setDescription('The integer value of relay severity level of the extra variable as reported by the DC power system controller relay output group') dcPwrSysAnalogOpCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysAnalogOpCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAnalogOpCount.setDescription('Number of analog output variables in system controller analog output table') dcPwrSysAnalogOpTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 2, 2), ) if mibBuilder.loadTexts: dcPwrSysAnalogOpTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAnalogOpTable.setDescription('A table of DC power system controller analog output variables') dcPwrSysAnalogOpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 2, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysAnalogOpIndex")) if mibBuilder.loadTexts: dcPwrSysAnalogOpEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAnalogOpEntry.setDescription('An entry into the DC power system controller analog output group') dcPwrSysAnalogOpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysAnalogOpIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAnalogOpIndex.setDescription('The index of the analog variable in the power system controller analog output group') dcPwrSysAnalogOpName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 2, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysAnalogOpName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAnalogOpName.setDescription('The description of the analog variable as reported by the DC power system controller analog output group') dcPwrSysAnalogOpIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysAnalogOpIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAnalogOpIntegerValue.setDescription('The integer value of the analog variable as reported by the DC power system controller analog output group') dcPwrSysAnalogOpStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 2, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysAnalogOpStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAnalogOpStringValue.setDescription('The string value of the analog variable as reported by the DC power system controller analog output group') dcPwrSysAnalogOpSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 4, 2, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysAnalogOpSeverity.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAnalogOpSeverity.setDescription('The integer value of analog severity level of the extra variable as reported by the DC power system controller analog output group') dcPwrSysRectAlrmCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRectAlrmCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectAlrmCount.setDescription('Number of rectifier alarm variables in system controller alarm table') dcPwrSysRectAlrmTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 1, 2), ) if mibBuilder.loadTexts: dcPwrSysRectAlrmTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectAlrmTable.setDescription('A table of DC power system controller rectifier alarm variables') dcPwrSysRectAlrmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 1, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysRectAlrmIndex")) if mibBuilder.loadTexts: dcPwrSysRectAlrmEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectAlrmEntry.setDescription('An entry into the DC power system controller rectifier alarm group') dcPwrSysRectAlrmIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRectAlrmIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectAlrmIndex.setDescription('The index of the alarm variable in the DC power system controller table rectifier alarm group') dcPwrSysRectAlrmName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 1, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRectAlrmName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectAlrmName.setDescription('The description of the alarm variable as reported by the DC power system controller rectifier alarm group') dcPwrSysRectAlrmIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRectAlrmIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectAlrmIntegerValue.setDescription('The integer value of the alarm variable as reported by the DC power system controller rectifier alarm group') dcPwrSysRectAlrmStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 1, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRectAlrmStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectAlrmStringValue.setDescription('The string value of the alarm variable as reported by the DC power system controller rectifier alarm group') dcPwrSysRectAlrmSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 1, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRectAlrmSeverity.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectAlrmSeverity.setDescription('The integer value of alarm severity level of the extra variable as reported by the DC power system controller rectifier alarm group') dcPwrSysDigAlrmCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysDigAlrmCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigAlrmCount.setDescription('Number of digital alarm variables in system controller alarm table') dcPwrSysDigAlrmTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 2, 2), ) if mibBuilder.loadTexts: dcPwrSysDigAlrmTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigAlrmTable.setDescription('A table of DC power system controller digital alarm variables') dcPwrSysDigAlrmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 2, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysDigAlrmIndex")) if mibBuilder.loadTexts: dcPwrSysDigAlrmEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigAlrmEntry.setDescription('An entry into the DC power system controller digital alarm group') dcPwrSysDigAlrmIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysDigAlrmIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigAlrmIndex.setDescription('The index of the alarm variable in the DC power system controller table digital alarm group') dcPwrSysDigAlrmName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 2, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysDigAlrmName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigAlrmName.setDescription('The description of the alarm variable as reported by the DC power system controller digital alarm group') dcPwrSysDigAlrmIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysDigAlrmIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigAlrmIntegerValue.setDescription('The integer value of the alarm variable as reported by the DC power system controller digital alarm group') dcPwrSysDigAlrmStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 2, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysDigAlrmStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigAlrmStringValue.setDescription('The string value of the alarm variable as reported by the DC power system controller digital alarm group') dcPwrSysDigAlrmSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 2, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysDigAlrmSeverity.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigAlrmSeverity.setDescription('The integer value of alarm severity level of the extra variable as reported by the DC power system controller digital alarm group') dcPwrSysCurrAlrmCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCurrAlrmCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCurrAlrmCount.setDescription('Number of current alarm variables in system controller alarm table') dcPwrSysCurrAlrmTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 3, 2), ) if mibBuilder.loadTexts: dcPwrSysCurrAlrmTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCurrAlrmTable.setDescription('A table of DC power system controller current alarm variables') dcPwrSysCurrAlrmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 3, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysCurrAlrmIndex")) if mibBuilder.loadTexts: dcPwrSysCurrAlrmEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCurrAlrmEntry.setDescription('An entry into the DC power system controller current alarm group') dcPwrSysCurrAlrmIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 3, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCurrAlrmIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCurrAlrmIndex.setDescription('The index of the alarm variable in the DC power system controller table current alarm group') dcPwrSysCurrAlrmName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 3, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCurrAlrmName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCurrAlrmName.setDescription('The description of the alarm variable as reported by the DC power system controller current alarm group') dcPwrSysCurrAlrmIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 3, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCurrAlrmIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCurrAlrmIntegerValue.setDescription('The integer value of the alarm variable as reported by the DC power system controller current alarm group') dcPwrSysCurrAlrmStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 3, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCurrAlrmStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCurrAlrmStringValue.setDescription('The string value of the alarm variable as reported by the DC power system controller current alarm group') dcPwrSysCurrAlrmSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 3, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCurrAlrmSeverity.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCurrAlrmSeverity.setDescription('The integer value of alarm severity level of the extra variable as reported by the DC power system controller current alarm group') dcPwrSysVoltAlrmCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 4, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysVoltAlrmCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysVoltAlrmCount.setDescription('Number of voltage alarm variables in system controller alarm table') dcPwrSysVoltAlrmTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 4, 2), ) if mibBuilder.loadTexts: dcPwrSysVoltAlrmTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysVoltAlrmTable.setDescription('A table of DC power system controller voltage alarm variables') dcPwrSysVoltAlrmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 4, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysVoltAlrmIndex")) if mibBuilder.loadTexts: dcPwrSysVoltAlrmEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysVoltAlrmEntry.setDescription('An entry into the DC power system controller voltage alarm group') dcPwrSysVoltAlrmIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysVoltAlrmIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysVoltAlrmIndex.setDescription('The index of the alarm variable in the DC power system controller table voltage alarm group') dcPwrSysVoltAlrmName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 4, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysVoltAlrmName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysVoltAlrmName.setDescription('The description of the alarm variable as reported by the DC power system controller voltage alarm group') dcPwrSysVoltAlrmIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 4, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysVoltAlrmIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysVoltAlrmIntegerValue.setDescription('The integer value of the alarm variable as reported by the DC power system controller voltage alarm group') dcPwrSysVoltAlrmStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 4, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysVoltAlrmStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysVoltAlrmStringValue.setDescription('The string value of the alarm variable as reported by the DC power system controller voltage alarm group') dcPwrSysVoltAlrmSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 4, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysVoltAlrmSeverity.setStatus('current') if mibBuilder.loadTexts: dcPwrSysVoltAlrmSeverity.setDescription('The integer value of alarm severity level of the extra variable as reported by the DC power system controller voltage alarm group') dcPwrSysBattAlrmCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 5, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysBattAlrmCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysBattAlrmCount.setDescription('Number of battery alarm variables in system controller alarm table') dcPwrSysBattAlrmTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 5, 2), ) if mibBuilder.loadTexts: dcPwrSysBattAlrmTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysBattAlrmTable.setDescription('A table of DC power system controller battery alarm variables') dcPwrSysBattAlrmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 5, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysBattAlrmIndex")) if mibBuilder.loadTexts: dcPwrSysBattAlrmEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysBattAlrmEntry.setDescription('An entry into the DC power system controller battery alarm group') dcPwrSysBattAlrmIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 5, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysBattAlrmIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysBattAlrmIndex.setDescription('The index of the alarm variable in the DC power system controller table battery alarm group') dcPwrSysBattAlrmName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 5, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysBattAlrmName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysBattAlrmName.setDescription('The description of the alarm variable as reported by the DC power system controller battery alarm group') dcPwrSysBattAlrmIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 5, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysBattAlrmIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysBattAlrmIntegerValue.setDescription('The integer value of the alarm variable as reported by the DC power system controller battery alarm group') dcPwrSysBattAlrmStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 5, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysBattAlrmStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysBattAlrmStringValue.setDescription('The string value of the alarm variable as reported by the DC power system controller battery alarm group') dcPwrSysBattAlrmSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 5, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysBattAlrmSeverity.setStatus('current') if mibBuilder.loadTexts: dcPwrSysBattAlrmSeverity.setDescription('The integer value of alarm severity level of the extra variable as reported by the DC power system controller battery alarm group') dcPwrSysTempAlrmCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 6, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysTempAlrmCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTempAlrmCount.setDescription('Number of temperature alarm variables in system controller alarm table') dcPwrSysTempAlrmTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 6, 2), ) if mibBuilder.loadTexts: dcPwrSysTempAlrmTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTempAlrmTable.setDescription('A table of DC power system controller temperature alarm variables') dcPwrSysTempAlrmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 6, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysTempAlrmIndex")) if mibBuilder.loadTexts: dcPwrSysTempAlrmEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTempAlrmEntry.setDescription('An entry into the DC power system controller temperature alarm group') dcPwrSysTempAlrmIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 6, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysTempAlrmIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTempAlrmIndex.setDescription('The index of the alarm variable in the DC power system controller table temperature alarm group') dcPwrSysTempAlrmName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 6, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysTempAlrmName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTempAlrmName.setDescription('The description of the alarm variable as reported by the DC power system controller temperature alarm group') dcPwrSysTempAlrmIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 6, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysTempAlrmIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTempAlrmIntegerValue.setDescription('The integer value of the alarm variable as reported by the DC power system controller temperature alarm group') dcPwrSysTempAlrmStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 6, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysTempAlrmStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTempAlrmStringValue.setDescription('The string value of the alarm variable as reported by the DC power system controller temperature alarm group') dcPwrSysTempAlrmSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 6, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysTempAlrmSeverity.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTempAlrmSeverity.setDescription('The integer value of alarm severity level of the extra variable as reported by the DC power system controller temperature alarm group') dcPwrSysCustomAlrmCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 7, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCustomAlrmCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCustomAlrmCount.setDescription('Number of custom alarm variables in system controller alarm table') dcPwrSysCustomAlrmTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 7, 2), ) if mibBuilder.loadTexts: dcPwrSysCustomAlrmTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCustomAlrmTable.setDescription('A table of DC power system controller custom alarm variables') dcPwrSysCustomAlrmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 7, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysCustomAlrmIndex")) if mibBuilder.loadTexts: dcPwrSysCustomAlrmEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCustomAlrmEntry.setDescription('An entry into the DC power system controller custom alarm group') dcPwrSysCustomAlrmIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 7, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCustomAlrmIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCustomAlrmIndex.setDescription('The index of the alarm variable in the DC power system controller table custom alarm group') dcPwrSysCustomAlrmName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 7, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCustomAlrmName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCustomAlrmName.setDescription('The description of the alarm variable as reported by the DC power system controller custom alarm group') dcPwrSysCustomAlrmIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 7, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCustomAlrmIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCustomAlrmIntegerValue.setDescription('The integer value of the alarm variable as reported by the DC power system controller custom alarm group') dcPwrSysCustomAlrmStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 7, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCustomAlrmStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCustomAlrmStringValue.setDescription('The string value of the alarm variable as reported by the DC power system controller custom alarm group') dcPwrSysCustomAlrmSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 7, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCustomAlrmSeverity.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCustomAlrmSeverity.setDescription('The integer value of alarm severity level of the extra variable as reported by the DC power system controller custom alarm group') dcPwrSysMiscAlrmCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 8, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysMiscAlrmCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysMiscAlrmCount.setDescription('Number of misc alarm variables in system controller alarm table') dcPwrSysMiscAlrmTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 8, 2), ) if mibBuilder.loadTexts: dcPwrSysMiscAlrmTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysMiscAlrmTable.setDescription('A table of DC power system controller misc alarm variables') dcPwrSysMiscAlrmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 8, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysMiscAlrmIndex")) if mibBuilder.loadTexts: dcPwrSysMiscAlrmEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysMiscAlrmEntry.setDescription('An entry into the DC power system controller misc alarm group') dcPwrSysMiscAlrmIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 8, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysMiscAlrmIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysMiscAlrmIndex.setDescription('The index of the alarm variable in the DC power system controller table misc alarm group') dcPwrSysMiscAlrmName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 8, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysMiscAlrmName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysMiscAlrmName.setDescription('The description of the alarm variable as reported by the DC power system controller misc alarm group') dcPwrSysMiscAlrmIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 8, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysMiscAlrmIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysMiscAlrmIntegerValue.setDescription('The integer value of the alarm variable as reported by the DC power system controller misc alarm group') dcPwrSysMiscAlrmStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 8, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysMiscAlrmStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysMiscAlrmStringValue.setDescription('The string value of the alarm variable as reported by the DC power system controller misc alarm group') dcPwrSysMiscAlrmSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 8, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysMiscAlrmSeverity.setStatus('current') if mibBuilder.loadTexts: dcPwrSysMiscAlrmSeverity.setDescription('The integer value of alarm severity level of the extra variable as reported by the DC power system controller misc alarm group') dcPwrSysCtrlAlrmCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 9, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCtrlAlrmCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCtrlAlrmCount.setDescription('Number of control alarm variables in system controller alarm table') dcPwrSysCtrlAlrmTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 9, 2), ) if mibBuilder.loadTexts: dcPwrSysCtrlAlrmTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCtrlAlrmTable.setDescription('A table of DC power system controller control alarm variables') dcPwrSysCtrlAlrmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 9, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysCtrlAlrmIndex")) if mibBuilder.loadTexts: dcPwrSysCtrlAlrmEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCtrlAlrmEntry.setDescription('An entry into the DC power system controller control alarm group') dcPwrSysCtrlAlrmIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 9, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCtrlAlrmIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCtrlAlrmIndex.setDescription('The index of the alarm variable in the DC power system controller table control alarm group') dcPwrSysCtrlAlrmName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 9, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCtrlAlrmName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCtrlAlrmName.setDescription('The description of the alarm variable as reported by the DC power system controller control alarm group') dcPwrSysCtrlAlrmIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 9, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCtrlAlrmIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCtrlAlrmIntegerValue.setDescription('The integer value of the alarm variable as reported by the DC power system controller control alarm group') dcPwrSysCtrlAlrmStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 9, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCtrlAlrmStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCtrlAlrmStringValue.setDescription('The string value of the alarm variable as reported by the DC power system controller control alarm group') dcPwrSysCtrlAlrmSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 9, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCtrlAlrmSeverity.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCtrlAlrmSeverity.setDescription('The integer value of alarm severity level of the extra variable as reported by the DC power system controller control alarm group') dcPwrSysAdioAlrmCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 10, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysAdioAlrmCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAdioAlrmCount.setDescription('Number of control alarm variables in Adio alarm table') dcPwrSysAdioAlrmTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 10, 2), ) if mibBuilder.loadTexts: dcPwrSysAdioAlrmTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAdioAlrmTable.setDescription('A table of DC power system controller Adio alarm variables') dcPwrSysAdioAlrmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 10, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysAdioAlrmIndex")) if mibBuilder.loadTexts: dcPwrSysAdioAlrmEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAdioAlrmEntry.setDescription('An entry into the DC power system controller Adio alarm group') dcPwrSysAdioAlrmIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 10, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysAdioAlrmIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAdioAlrmIndex.setDescription('The index of the alarm variable in the DC power system controller table Adio alarm group') dcPwrSysAdioAlrmName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 10, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysAdioAlrmName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAdioAlrmName.setDescription('The description of the alarm variable as reported by the DC power system controller Adio alarm group') dcPwrSysAdioAlrmIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 10, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysAdioAlrmIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAdioAlrmIntegerValue.setDescription('The integer value of the alarm variable as reported by the DC power system controller Adio alarm group') dcPwrSysAdioAlrmStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 10, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysAdioAlrmStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAdioAlrmStringValue.setDescription('The string value of the alarm variable as reported by the DC power system controller Adio alarm group') dcPwrSysAdioAlrmSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 10, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysAdioAlrmSeverity.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAdioAlrmSeverity.setDescription('The integer value of alarm severity level of the extra variable as reported by the DC Adio system controller control alarm group') dcPwrSysConvAlrmCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 11, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysConvAlrmCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvAlrmCount.setDescription('Number of Converter alarm variables in system controller alarm table') dcPwrSysConvAlrmTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 11, 2), ) if mibBuilder.loadTexts: dcPwrSysConvAlrmTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvAlrmTable.setDescription('A table of DC power system controller Converter alarm variables') dcPwrSysConvAlrmEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 11, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysConvAlrmIndex")) if mibBuilder.loadTexts: dcPwrSysConvAlrmEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvAlrmEntry.setDescription('An entry into the DC power system controller Converter alarm group') dcPwrSysConvAlrmIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 11, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysConvAlrmIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvAlrmIndex.setDescription('The index of the alarm variable in the DC power system controller table Converter alarm group') dcPwrSysConvAlrmName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 11, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysConvAlrmName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvAlrmName.setDescription('The description of the alarm variable as reported by the DC power system controller Converter alarm group') dcPwrSysConvAlrmIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 11, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysConvAlrmIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvAlrmIntegerValue.setDescription('The integer value of the alarm variable as reported by the DC power system controller Converter alarm group') dcPwrSysConvAlrmStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 11, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysConvAlrmStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvAlrmStringValue.setDescription('The string value of the alarm variable as reported by the DC power system controller Converter alarm group') dcPwrSysConvAlrmSeverity = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 5, 11, 2, 1, 5), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysConvAlrmSeverity.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvAlrmSeverity.setDescription('The integer value of alarm severity level of the extra variable as reported by the DC power system controller Converter alarm group') dcPwrSysDigIpCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysDigIpCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigIpCount.setDescription('Number of digital input variables in system controller digital input table') dcPwrSysDigIpTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 1, 2), ) if mibBuilder.loadTexts: dcPwrSysDigIpTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigIpTable.setDescription('A table of DC power system controller digital input variables') dcPwrSysDigIpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 1, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysDigIpIndex")) if mibBuilder.loadTexts: dcPwrSysDigIpEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigIpEntry.setDescription('An entry into the DC power system controller digital input group') dcPwrSysDigIpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 1, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysDigIpIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigIpIndex.setDescription('The index of the digital input variable in the DC power system controller table digital input group') dcPwrSysDigIpName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 1, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysDigIpName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigIpName.setDescription('The description of the digital input variable as reported by the DC power system controller digital input group') dcPwrSysDigIpIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 1, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysDigIpIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigIpIntegerValue.setDescription('The integer value of the digital input variable as reported by the DC power system controller digital input group') dcPwrSysDigIpStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 1, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysDigIpStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysDigIpStringValue.setDescription('The string value of the digital input variable as reported by the DC power system controller digital input group') dcPwrSysCntrlrIpCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 2, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCntrlrIpCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCntrlrIpCount.setDescription('Number of controller input variables in system controller controller input table') dcPwrSysCntrlrIpTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 2, 2), ) if mibBuilder.loadTexts: dcPwrSysCntrlrIpTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCntrlrIpTable.setDescription('A table of DC power system controller controller input variables') dcPwrSysCntrlrIpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 2, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysCntrlrIpIndex")) if mibBuilder.loadTexts: dcPwrSysCntrlrIpEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCntrlrIpEntry.setDescription('An entry into the DC power system controller controller input group') dcPwrSysCntrlrIpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 2, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCntrlrIpIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCntrlrIpIndex.setDescription('The index of the controller input variable in the DC power system controller table controller input group') dcPwrSysCntrlrIpName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 2, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCntrlrIpName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCntrlrIpName.setDescription('The description of the controller input variable as reported by the DC power system controller controller input group') dcPwrSysCntrlrIpIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 2, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCntrlrIpIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCntrlrIpIntegerValue.setDescription('The integer value of the controller input variable as reported by the DC power system controller controller input group') dcPwrSysCntrlrIpStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 2, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCntrlrIpStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCntrlrIpStringValue.setDescription('The string value of the controller input variable as reported by the DC power system controller controller input group') dcPwrSysRectIpCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 3, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRectIpCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectIpCount.setDescription('Number of rectifier input variables in system controller rectifier input table') dcPwrSysRectIpTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 3, 2), ) if mibBuilder.loadTexts: dcPwrSysRectIpTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectIpTable.setDescription('A table of DC power system controller rectifier input variables') dcPwrSysRectIpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 3, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysRectIpIndex")) if mibBuilder.loadTexts: dcPwrSysRectIpEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectIpEntry.setDescription('An entry into the DC power system controller rectifier input group') dcPwrSysRectIpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 3, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRectIpIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectIpIndex.setDescription('The index of the rectifier input variable in the DC power system controller table rectifier input group') dcPwrSysRectIpName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 3, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRectIpName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectIpName.setDescription('The description of the rectifier input variable as reported by the DC power system controller rectifier input group') dcPwrSysRectIpIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 3, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRectIpIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectIpIntegerValue.setDescription('The integer value of the rectifier input variable as reported by the DC power system controller rectifier input group') dcPwrSysRectIpStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 3, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysRectIpStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRectIpStringValue.setDescription('The string value of the rectifier input variable as reported by the DC power system controller rectifier input group') dcPwrSysCustomIpCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 4, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCustomIpCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCustomIpCount.setDescription('Number of custom input variables in system controller custom input table') dcPwrSysCustomIpTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 4, 2), ) if mibBuilder.loadTexts: dcPwrSysCustomIpTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCustomIpTable.setDescription('A table of DC power system controller digital custom variables') dcPwrSysCustomIpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 4, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysCustomIpIndex")) if mibBuilder.loadTexts: dcPwrSysCustomIpEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCustomIpEntry.setDescription('An entry into the DC power system controller custom input group') dcPwrSysCustomIpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 4, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCustomIpIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCustomIpIndex.setDescription('The index of the custom input variable in the DC power system controller table custom input group') dcPwrSysCustomIpName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 4, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCustomIpName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCustomIpName.setDescription('The description of the custom input variable as reported by the DC power system controller custom input group') dcPwrSysgCustomIpIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 4, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysgCustomIpIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysgCustomIpIntegerValue.setDescription('The integer value of the custom input variable as reported by the DC power system controller custom input group') dcPwrSysCustomIpStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 4, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCustomIpStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCustomIpStringValue.setDescription('The string value of the custom input variable as reported by the DC power system controller custom input group') dcPwrSysConvIpCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 5, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysConvIpCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvIpCount.setDescription('Number of Converter input variables in system controller Converter input table') dcPwrSysConvIpTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 5, 2), ) if mibBuilder.loadTexts: dcPwrSysConvIpTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvIpTable.setDescription('A table of DC power system controller Converter input variables') dcPwrSysConvIpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 5, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysConvIpIndex")) if mibBuilder.loadTexts: dcPwrSysConvIpEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvIpEntry.setDescription('An entry into the DC power system controller Converter input group') dcPwrSysConvIpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 5, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysConvIpIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvIpIndex.setDescription('The index of the Converter input variable in the DC power system controller table Converter input group') dcPwrSysConvIpName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 5, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysConvIpName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvIpName.setDescription('The description of the Converter input variable as reported by the DC power system controller Converter input group') dcPwrSysConvIpIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 5, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysConvIpIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvIpIntegerValue.setDescription('The integer value of the Converter input variable as reported by the DC power system controller Converter input group') dcPwrSysConvIpStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 5, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysConvIpStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysConvIpStringValue.setDescription('The string value of the Converter input variable as reported by the DC power system controller Converter input group') dcPwrSysTimerIpCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 6, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysTimerIpCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTimerIpCount.setDescription('Number of Timererter input variables in system controller Timererter input table') dcPwrSysTimerIpTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 6, 2), ) if mibBuilder.loadTexts: dcPwrSysTimerIpTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTimerIpTable.setDescription('A table of DC power system controller Timererter input variables') dcPwrSysTimerIpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 6, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysTimerIpIndex")) if mibBuilder.loadTexts: dcPwrSysTimerIpEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTimerIpEntry.setDescription('An entry into the DC power system controller Timererter input group') dcPwrSysTimerIpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 6, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysTimerIpIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTimerIpIndex.setDescription('The index of the Timererter input variable in the DC power system controller table Timererter input group') dcPwrSysTimerIpName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 6, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysTimerIpName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTimerIpName.setDescription('The description of the Timererter input variable as reported by the DC power system controller Timererter input group') dcPwrSysTimerIpIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 6, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysTimerIpIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTimerIpIntegerValue.setDescription('The integer value of the Timererter input variable as reported by the DC power system controller Timererter input group') dcPwrSysTimerIpStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 6, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysTimerIpStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTimerIpStringValue.setDescription('The string value of the Timererter input variable as reported by the DC power system controller Timererter input group') dcPwrSysCounterIpCount = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 7, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCounterIpCount.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCounterIpCount.setDescription('Number of Countererter input variables in system controller Countererter input table') dcPwrSysCounterIpTable = MibTable((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 7, 2), ) if mibBuilder.loadTexts: dcPwrSysCounterIpTable.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCounterIpTable.setDescription('A table of DC power system controller Countererter input variables') dcPwrSysCounterIpEntry = MibTableRow((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 7, 2, 1), ).setIndexNames((0, "Argus-MIB", "dcPwrSysCounterIpIndex")) if mibBuilder.loadTexts: dcPwrSysCounterIpEntry.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCounterIpEntry.setDescription('An entry into the DC power system controller Countererter input group') dcPwrSysCounterIpIndex = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 7, 2, 1, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCounterIpIndex.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCounterIpIndex.setDescription('The index of the Countererter input variable in the DC power system controller table Countererter input group') dcPwrSysCounterIpName = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 7, 2, 1, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 30))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCounterIpName.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCounterIpName.setDescription('The description of the Countererter input variable as reported by the DC power system controller Countererter input group') dcPwrSysCounterIpIntegerValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 7, 2, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-1000000000, 1000000000))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCounterIpIntegerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCounterIpIntegerValue.setDescription('The integer value of the Countererter input variable as reported by the DC power system controller Countererter input group') dcPwrSysCounterIpStringValue = MibTableColumn((1, 3, 6, 1, 4, 1, 7309, 4, 1, 6, 7, 2, 1, 4), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysCounterIpStringValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysCounterIpStringValue.setDescription('The string value of the Countererter input variable as reported by the DC power system controller Countererter input group') dcPwrSysTrap = MibIdentifier((1, 3, 6, 1, 4, 1, 7309, 4, 1, 3, 0)) dcPwrSysAlarmActiveTrap = NotificationType((1, 3, 6, 1, 4, 1, 7309, 4, 1, 3, 0, 1)).setObjects(("Argus-MIB", "dcPwrSysRectAlrmStringValue"), ("Argus-MIB", "dcPwrSysRectAlrmIndex"), ("Argus-MIB", "dcPwrSysRectAlrmSeverity"), ("Argus-MIB", "dcPwrSysSiteName"), ("Argus-MIB", "dcPwrSysAlarmTriggerValue")) if mibBuilder.loadTexts: dcPwrSysAlarmActiveTrap.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAlarmActiveTrap.setDescription('A trap issued when one of the alarms on the DC power system controller became active') dcPwrSysAlarmClearedTrap = NotificationType((1, 3, 6, 1, 4, 1, 7309, 4, 1, 3, 0, 2)).setObjects(("Argus-MIB", "dcPwrSysRectAlrmStringValue"), ("Argus-MIB", "dcPwrSysRectAlrmIndex"), ("Argus-MIB", "dcPwrSysRectAlrmSeverity"), ("Argus-MIB", "dcPwrSysSiteName"), ("Argus-MIB", "dcPwrSysAlarmTriggerValue")) if mibBuilder.loadTexts: dcPwrSysAlarmClearedTrap.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAlarmClearedTrap.setDescription('A trap issued when one of the active alarms on the DC power system controller is cleared') dcPwrSysRelayTrap = NotificationType((1, 3, 6, 1, 4, 1, 7309, 4, 1, 3, 0, 3)).setObjects(("Argus-MIB", "dcPwrSysRelayIntegerValue"), ("Argus-MIB", "dcPwrSysRelayStringValue"), ("Argus-MIB", "dcPwrSysRelayIndex"), ("Argus-MIB", "dcPwrSysRelaySeverity"), ("Argus-MIB", "dcPwrSysSiteName")) if mibBuilder.loadTexts: dcPwrSysRelayTrap.setStatus('current') if mibBuilder.loadTexts: dcPwrSysRelayTrap.setDescription('A trap issued from a change in state in one of the relays on the DC power system controller') dcPwrSysComOKTrap = NotificationType((1, 3, 6, 1, 4, 1, 7309, 4, 1, 3, 0, 4)).setObjects(("Argus-MIB", "dcPwrSysSiteName")) if mibBuilder.loadTexts: dcPwrSysComOKTrap.setStatus('current') if mibBuilder.loadTexts: dcPwrSysComOKTrap.setDescription('A trap to indicate that communications with a DC power system controller has been established.') dcPwrSysComErrTrap = NotificationType((1, 3, 6, 1, 4, 1, 7309, 4, 1, 3, 0, 5)).setObjects(("Argus-MIB", "dcPwrSysSiteName")) if mibBuilder.loadTexts: dcPwrSysComErrTrap.setStatus('current') if mibBuilder.loadTexts: dcPwrSysComErrTrap.setDescription('A trap to indicate that communications with a DC power system controller has been lost.') dcPwrSysAgentStartupTrap = NotificationType((1, 3, 6, 1, 4, 1, 7309, 4, 1, 3, 0, 6)).setObjects(("Argus-MIB", "dcPwrSysSiteName")) if mibBuilder.loadTexts: dcPwrSysAgentStartupTrap.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAgentStartupTrap.setDescription('A trap to indicate that the agent software has started up.') dcPwrSysAgentShutdownTrap = NotificationType((1, 3, 6, 1, 4, 1, 7309, 4, 1, 3, 0, 7)).setObjects(("Argus-MIB", "dcPwrSysSiteName")) if mibBuilder.loadTexts: dcPwrSysAgentShutdownTrap.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAgentShutdownTrap.setDescription('A trap to indicate that the agent software has shutdown.') dcPwrSysMajorAlarmActiveTrap = NotificationType((1, 3, 6, 1, 4, 1, 7309, 4, 1, 3, 0, 8)).setObjects(("Argus-MIB", "dcPwrSysRectAlrmStringValue"), ("Argus-MIB", "dcPwrSysRectAlrmIndex"), ("Argus-MIB", "dcPwrSysRectAlrmSeverity"), ("Argus-MIB", "dcPwrSysSiteName")) if mibBuilder.loadTexts: dcPwrSysMajorAlarmActiveTrap.setStatus('current') if mibBuilder.loadTexts: dcPwrSysMajorAlarmActiveTrap.setDescription('A trap issued as a summary of DC power system status. It is sent when the system goes into in Major Alarm') dcPwrSysMajorAlarmClearedTrap = NotificationType((1, 3, 6, 1, 4, 1, 7309, 4, 1, 3, 0, 9)).setObjects(("Argus-MIB", "dcPwrSysRectAlrmStringValue"), ("Argus-MIB", "dcPwrSysRectAlrmIndex"), ("Argus-MIB", "dcPwrSysRectAlrmSeverity"), ("Argus-MIB", "dcPwrSysSiteName")) if mibBuilder.loadTexts: dcPwrSysMajorAlarmClearedTrap.setStatus('current') if mibBuilder.loadTexts: dcPwrSysMajorAlarmClearedTrap.setDescription('A trap issued as a summary of DC power system status. It is sent when the system comes out of Major Alarm') dcPwrSysMinorAlarmActiveTrap = NotificationType((1, 3, 6, 1, 4, 1, 7309, 4, 1, 3, 0, 10)).setObjects(("Argus-MIB", "dcPwrSysRectAlrmStringValue"), ("Argus-MIB", "dcPwrSysRectAlrmIndex"), ("Argus-MIB", "dcPwrSysRectAlrmSeverity"), ("Argus-MIB", "dcPwrSysSiteName")) if mibBuilder.loadTexts: dcPwrSysMinorAlarmActiveTrap.setStatus('current') if mibBuilder.loadTexts: dcPwrSysMinorAlarmActiveTrap.setDescription('A trap issued as a summary of DC power system status. It is sent when the system goes into in Minor Alarm') dcPwrSysMinorAlarmClearedTrap = NotificationType((1, 3, 6, 1, 4, 1, 7309, 4, 1, 3, 0, 11)).setObjects(("Argus-MIB", "dcPwrSysRectAlrmStringValue"), ("Argus-MIB", "dcPwrSysRectAlrmIndex"), ("Argus-MIB", "dcPwrSysRectAlrmSeverity"), ("Argus-MIB", "dcPwrSysSiteName")) if mibBuilder.loadTexts: dcPwrSysMinorAlarmClearedTrap.setStatus('current') if mibBuilder.loadTexts: dcPwrSysMinorAlarmClearedTrap.setDescription('A trap issued as a summary of DC power system status. It is sent when the system comes out of Minor Alarm') dcPwrSysResyncAlarms = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 8, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readwrite") if mibBuilder.loadTexts: dcPwrSysResyncAlarms.setStatus('current') if mibBuilder.loadTexts: dcPwrSysResyncAlarms.setDescription('Send/Resend all active alarms that were previously sent through SNMP notification.') dcPwrSysAlarmTriggerValue = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 9, 1), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 65535))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysAlarmTriggerValue.setStatus('current') if mibBuilder.loadTexts: dcPwrSysAlarmTriggerValue.setDescription('') dcPwrSysTimeStamp = MibScalar((1, 3, 6, 1, 4, 1, 7309, 4, 1, 9, 2), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(0, 255))).setMaxAccess("readonly") if mibBuilder.loadTexts: dcPwrSysTimeStamp.setStatus('current') if mibBuilder.loadTexts: dcPwrSysTimeStamp.setDescription('') mibBuilder.exportSymbols("Argus-MIB", dcPwrVarbindNameReference=dcPwrVarbindNameReference, dcPwrSysSoftwareVersion=dcPwrSysSoftwareVersion, dcPwrSysDigAlrmTbl=dcPwrSysDigAlrmTbl, dcPwrSysConvAlrmName=dcPwrSysConvAlrmName, dcPwrSysTimerIpName=dcPwrSysTimerIpName, dcPwrSysAlarmActiveTrap=dcPwrSysAlarmActiveTrap, dcPwrSysMinorAlarmClearedTrap=dcPwrSysMinorAlarmClearedTrap, dcPwrSysConvAlrmTable=dcPwrSysConvAlrmTable, dcPwrSysCtrlAlrmStringValue=dcPwrSysCtrlAlrmStringValue, dcPwrSysCustomAlrmStringValue=dcPwrSysCustomAlrmStringValue, dcPwrSysCurrAlrmIntegerValue=dcPwrSysCurrAlrmIntegerValue, dcPwrSysConvAlrmTbl=dcPwrSysConvAlrmTbl, dcPwrSysConvIpEntry=dcPwrSysConvIpEntry, dcPwrSysBattAlrmCount=dcPwrSysBattAlrmCount, dcPwrSysAdioAlrmName=dcPwrSysAdioAlrmName, dcPwrSysConvAlrmEntry=dcPwrSysConvAlrmEntry, dcPwrSysTempAlrmTbl=dcPwrSysTempAlrmTbl, dcPwrSysRelayCount=dcPwrSysRelayCount, dcPwrSysAdioAlrmTable=dcPwrSysAdioAlrmTable, dcPwrSysAlarmTriggerValue=dcPwrSysAlarmTriggerValue, dcPwrSysMiscAlrmTable=dcPwrSysMiscAlrmTable, dcPwrSysBattAlrmEntry=dcPwrSysBattAlrmEntry, dcPwrSysSiteNumber=dcPwrSysSiteNumber, dcPwrSysAnalogOpTbl=dcPwrSysAnalogOpTbl, dcPwrSysRectIpEntry=dcPwrSysRectIpEntry, dcPwrSysMiscAlrmIndex=dcPwrSysMiscAlrmIndex, dcPwrSysTempAlrmName=dcPwrSysTempAlrmName, dcPwrSysBattAlrmTbl=dcPwrSysBattAlrmTbl, dcPwrSysDigAlrmName=dcPwrSysDigAlrmName, dcPwrSysComErrTrap=dcPwrSysComErrTrap, dcPwrSysCustomAlrmEntry=dcPwrSysCustomAlrmEntry, dcPwrSysConvIpStringValue=dcPwrSysConvIpStringValue, dcPwrSysDigAlrmCount=dcPwrSysDigAlrmCount, dcPwrSysCntrlrIpCount=dcPwrSysCntrlrIpCount, dcPwrSysRelayStringValue=dcPwrSysRelayStringValue, dcPwrSysAnalogOpSeverity=dcPwrSysAnalogOpSeverity, dcPwrSysRectAlrmEntry=dcPwrSysRectAlrmEntry, dcPwrSysCtrlAlrmTbl=dcPwrSysCtrlAlrmTbl, dcPwrSysAnalogOpStringValue=dcPwrSysAnalogOpStringValue, dcPwrSysRectAlrmIndex=dcPwrSysRectAlrmIndex, dcPwrSysSiteCountry=dcPwrSysSiteCountry, dcPwrSysBattAlrmStringValue=dcPwrSysBattAlrmStringValue, dcPwrSysDigAlrmTable=dcPwrSysDigAlrmTable, dcPwrSysPhoneNumber=dcPwrSysPhoneNumber, dcPwrSysCustomAlrmIndex=dcPwrSysCustomAlrmIndex, dcPwrSysContactName=dcPwrSysContactName, dcPwrSysCustomIpEntry=dcPwrSysCustomIpEntry, dcPwrSysCounterIpEntry=dcPwrSysCounterIpEntry, dcPwrSysMajorAlarmActiveTrap=dcPwrSysMajorAlarmActiveTrap, dcPwrSysRectIpStringValue=dcPwrSysRectIpStringValue, dcPwrSysTraps=dcPwrSysTraps, PYSNMP_MODULE_ID=argus, dcPwrSysMiscAlrmSeverity=dcPwrSysMiscAlrmSeverity, dcPwrSysVoltAlrmSeverity=dcPwrSysVoltAlrmSeverity, dcPwrSysVoltAlrmCount=dcPwrSysVoltAlrmCount, dcPwrSysCtrlAlrmIntegerValue=dcPwrSysCtrlAlrmIntegerValue, dcPwrSysResyncAlarms=dcPwrSysResyncAlarms, dcPwrSysRelayName=dcPwrSysRelayName, dcPwrSysAdioAlrmTbl=dcPwrSysAdioAlrmTbl, dcPwrSysDigIpTable=dcPwrSysDigIpTable, dcPwrSysRelayTable=dcPwrSysRelayTable, dcPwrSysDischargeAmps=dcPwrSysDischargeAmps, dcPwrSysDigIpIndex=dcPwrSysDigIpIndex, dcPwrSysConvIpIntegerValue=dcPwrSysConvIpIntegerValue, dcPwrSysMinorAlarm=dcPwrSysMinorAlarm, dcPwrSysRelaySeverity=dcPwrSysRelaySeverity, dcPwrSysCurrAlrmName=dcPwrSysCurrAlrmName, dcPwrSysTimerIpCount=dcPwrSysTimerIpCount, dcPwrSysCntrlrIpTable=dcPwrSysCntrlrIpTable, dcPwrSysVoltAlrmIntegerValue=dcPwrSysVoltAlrmIntegerValue, dcPwrSysInputsTbl=dcPwrSysInputsTbl, dcPwrExternalControls=dcPwrExternalControls, dcPwrSysConvIpIndex=dcPwrSysConvIpIndex, dcPwrSysMajorAlarmClearedTrap=dcPwrSysMajorAlarmClearedTrap, dcPwrSysDevice=dcPwrSysDevice, dcPwrSysCustomAlrmTbl=dcPwrSysCustomAlrmTbl, dcPwrSysMajorAlarm=dcPwrSysMajorAlarm, dcPwrSysTempAlrmEntry=dcPwrSysTempAlrmEntry, dcPwrSysTempAlrmSeverity=dcPwrSysTempAlrmSeverity, dcPwrSysCntrlrIpName=dcPwrSysCntrlrIpName, dcPwrSysOutputsTbl=dcPwrSysOutputsTbl, dcPwrSysSystemNumber=dcPwrSysSystemNumber, dcPwrSysTempAlrmStringValue=dcPwrSysTempAlrmStringValue, dcPwrSysCtrlAlrmIndex=dcPwrSysCtrlAlrmIndex, dcPwrSysTimeStamp=dcPwrSysTimeStamp, dcPwrSysConvIpTable=dcPwrSysConvIpTable, dcPwrSysDigIpName=dcPwrSysDigIpName, dcPwrSysCurrAlrmStringValue=dcPwrSysCurrAlrmStringValue, dcPwrSysAgentShutdownTrap=dcPwrSysAgentShutdownTrap, dcPwrSysRectIpName=dcPwrSysRectIpName, dcPwrSysMiscAlrmEntry=dcPwrSysMiscAlrmEntry, dcPwrSysTrap=dcPwrSysTrap, dcPwrSysRectAlrmName=dcPwrSysRectAlrmName, dcPwrSysVoltAlrmTable=dcPwrSysVoltAlrmTable, dcPwrSysTempAlrmCount=dcPwrSysTempAlrmCount, dcPwrSysChargeAmps=dcPwrSysChargeAmps, dcPwrSysTempAlrmTable=dcPwrSysTempAlrmTable, dcPwrSysMiscAlrmTbl=dcPwrSysMiscAlrmTbl, dcPwrSysAnalogOpIndex=dcPwrSysAnalogOpIndex, dcPwrSysCntrlrIpEntry=dcPwrSysCntrlrIpEntry, dcPwrSysSiteRegion=dcPwrSysSiteRegion, dcPwrSysString=dcPwrSysString, dcPwrSysBattAlrmName=dcPwrSysBattAlrmName, dcPwrSysSystemType=dcPwrSysSystemType, dcPwrSysConvAlrmSeverity=dcPwrSysConvAlrmSeverity, dcPwrSysRectIpCount=dcPwrSysRectIpCount, dcPwrSysTimerIpIntegerValue=dcPwrSysTimerIpIntegerValue, dcPwrSysCtrlAlrmEntry=dcPwrSysCtrlAlrmEntry, argus=argus, dcPwrSysRectAlrmTbl=dcPwrSysRectAlrmTbl, dcPwrSysRectAlrmIntegerValue=dcPwrSysRectAlrmIntegerValue, dcPwrSysTempAlrmIndex=dcPwrSysTempAlrmIndex, dcPwrSysDigAlrmEntry=dcPwrSysDigAlrmEntry, dcPwrSysAnalogOpCount=dcPwrSysAnalogOpCount, dcPwrSysComOKTrap=dcPwrSysComOKTrap, dcPwrSysCurrAlrmSeverity=dcPwrSysCurrAlrmSeverity, dcPwrSysVoltAlrmIndex=dcPwrSysVoltAlrmIndex, dcPwrSysConvIpName=dcPwrSysConvIpName, dcPwrSysCounterIpStringValue=dcPwrSysCounterIpStringValue, dcpower=dcpower, dcPwrSysCustomIpCount=dcPwrSysCustomIpCount, dcPwrSysVariable=dcPwrSysVariable, dcPwrSysAgentStartupTrap=dcPwrSysAgentStartupTrap, dcPwrSysAdioAlrmCount=dcPwrSysAdioAlrmCount, dcPwrSysRectAlrmSeverity=dcPwrSysRectAlrmSeverity, dcPwrSysCntrlrIpIntegerValue=dcPwrSysCntrlrIpIntegerValue, dcPwrSysAnalogOpIntegerValue=dcPwrSysAnalogOpIntegerValue, dcPwrSysRelayTbl=dcPwrSysRelayTbl, dcPwrSysCustomIpTbl=dcPwrSysCustomIpTbl, dcPwrSysCntrlrIpIndex=dcPwrSysCntrlrIpIndex, dcPwrSysCurrAlrmIndex=dcPwrSysCurrAlrmIndex, dcPwrSysCounterIpIntegerValue=dcPwrSysCounterIpIntegerValue, dcPwrSysDigIpStringValue=dcPwrSysDigIpStringValue, dcPwrSysAdioAlrmEntry=dcPwrSysAdioAlrmEntry, dcPwrSysDigAlrmIndex=dcPwrSysDigAlrmIndex, dcPwrSysRectIpTbl=dcPwrSysRectIpTbl, dcPwrSysRelayIntegerValue=dcPwrSysRelayIntegerValue, dcPwrSysDigIpCount=dcPwrSysDigIpCount, dcPwrSysMiscAlrmCount=dcPwrSysMiscAlrmCount, dcPwrSysDigIpEntry=dcPwrSysDigIpEntry, dcPwrSysMiscAlrmName=dcPwrSysMiscAlrmName, dcPwrSysRelayEntry=dcPwrSysRelayEntry, dcPwrSysMinorAlarmActiveTrap=dcPwrSysMinorAlarmActiveTrap, dcPwrSysBattAlrmIntegerValue=dcPwrSysBattAlrmIntegerValue, dcPwrSysTimerIpTbl=dcPwrSysTimerIpTbl, dcPwrSysConvIpTbl=dcPwrSysConvIpTbl, dcPwrSysRectIpIntegerValue=dcPwrSysRectIpIntegerValue, dcPwrSysBattAlrmIndex=dcPwrSysBattAlrmIndex, dcPwrSysRectAlrmTable=dcPwrSysRectAlrmTable, dcPwrSysDischargeVolts=dcPwrSysDischargeVolts, dcPwrSysgCustomIpIntegerValue=dcPwrSysgCustomIpIntegerValue, dcPwrSysDigAlrmStringValue=dcPwrSysDigAlrmStringValue, dcPwrSysVoltAlrmStringValue=dcPwrSysVoltAlrmStringValue, dcPwrSysAnalogOpName=dcPwrSysAnalogOpName, dcPwrSysRelayIndex=dcPwrSysRelayIndex, dcPwrSysSiteName=dcPwrSysSiteName, dcPwrSysConvAlrmStringValue=dcPwrSysConvAlrmStringValue, dcPwrSysVoltAlrmTbl=dcPwrSysVoltAlrmTbl, dcPwrSysConvAlrmIndex=dcPwrSysConvAlrmIndex, dcPwrSysCntrlrIpTbl=dcPwrSysCntrlrIpTbl, dcPwrSysRectIpIndex=dcPwrSysRectIpIndex, dcPwrSysMiscAlrmIntegerValue=dcPwrSysMiscAlrmIntegerValue, dcPwrSysAlrmsTbl=dcPwrSysAlrmsTbl, dcPwrSysRectAlrmCount=dcPwrSysRectAlrmCount, dcPwrSysRelayTrap=dcPwrSysRelayTrap, dcPwrSysBattAlrmSeverity=dcPwrSysBattAlrmSeverity, dcPwrSysCtrlAlrmCount=dcPwrSysCtrlAlrmCount, dcPwrSysCustomAlrmIntegerValue=dcPwrSysCustomAlrmIntegerValue, dcPwrSysTimerIpIndex=dcPwrSysTimerIpIndex, dcPwrSysVoltAlrmEntry=dcPwrSysVoltAlrmEntry, dcPwrSysAdioAlrmStringValue=dcPwrSysAdioAlrmStringValue, dcPwrSysDigIpTbl=dcPwrSysDigIpTbl, dcPwrSysCounterIpTbl=dcPwrSysCounterIpTbl, dcPwrSysCustomAlrmCount=dcPwrSysCustomAlrmCount, dcPwrSysCtrlAlrmName=dcPwrSysCtrlAlrmName, dcPwrSysConvAlrmCount=dcPwrSysConvAlrmCount, dcPwrSysCustomIpStringValue=dcPwrSysCustomIpStringValue, dcPwrSysDigAlrmSeverity=dcPwrSysDigAlrmSeverity, dcPwrSysConvAlrmIntegerValue=dcPwrSysConvAlrmIntegerValue, dcPwrSysChargeVolts=dcPwrSysChargeVolts, dcPwrSysBattAlrmTable=dcPwrSysBattAlrmTable, dcPwrSysCounterIpCount=dcPwrSysCounterIpCount, dcPwrSysDigAlrmIntegerValue=dcPwrSysDigAlrmIntegerValue, dcPwrSysCustomAlrmTable=dcPwrSysCustomAlrmTable, dcPwrSysCustomIpIndex=dcPwrSysCustomIpIndex, dcPwrSysCurrAlrmEntry=dcPwrSysCurrAlrmEntry, dcPwrSysDigIpIntegerValue=dcPwrSysDigIpIntegerValue, dcPwrSysVoltAlrmName=dcPwrSysVoltAlrmName, dcPwrSysMiscAlrmStringValue=dcPwrSysMiscAlrmStringValue, dcPwrSysCurrAlrmTbl=dcPwrSysCurrAlrmTbl, dcPwrSysTimerIpStringValue=dcPwrSysTimerIpStringValue, dcPwrSysCounterIpName=dcPwrSysCounterIpName, dcPwrSysCtrlAlrmSeverity=dcPwrSysCtrlAlrmSeverity, dcPwrSysRectAlrmStringValue=dcPwrSysRectAlrmStringValue, dcPwrSysCurrAlrmTable=dcPwrSysCurrAlrmTable, dcPwrSysCustomAlrmName=dcPwrSysCustomAlrmName, dcPwrSysCntrlrIpStringValue=dcPwrSysCntrlrIpStringValue, dcPwrSysConvIpCount=dcPwrSysConvIpCount, dcPwrSysAnalogOpTable=dcPwrSysAnalogOpTable, dcPwrSysCtrlAlrmTable=dcPwrSysCtrlAlrmTable, dcPwrSysSystemSerial=dcPwrSysSystemSerial, dcPwrSysAdioAlrmIndex=dcPwrSysAdioAlrmIndex, dcPwrSysCounterIpIndex=dcPwrSysCounterIpIndex, dcPwrSysAdioAlrmSeverity=dcPwrSysAdioAlrmSeverity, dcPwrSysCustomAlrmSeverity=dcPwrSysCustomAlrmSeverity, dcPwrSysTimerIpTable=dcPwrSysTimerIpTable, dcPwrSysAnalogOpEntry=dcPwrSysAnalogOpEntry, dcPwrSysSoftwareTimestamp=dcPwrSysSoftwareTimestamp, dcPwrSysAlarmClearedTrap=dcPwrSysAlarmClearedTrap, dcPwrSysSiteCity=dcPwrSysSiteCity, dcPwrSysCounterIpTable=dcPwrSysCounterIpTable, dcPwrSysCurrAlrmCount=dcPwrSysCurrAlrmCount, dcPwrSysAdioAlrmIntegerValue=dcPwrSysAdioAlrmIntegerValue, dcPwrSysRectIpTable=dcPwrSysRectIpTable, dcPwrSysCustomIpTable=dcPwrSysCustomIpTable, dcPwrSysCustomIpName=dcPwrSysCustomIpName, dcPwrSysTempAlrmIntegerValue=dcPwrSysTempAlrmIntegerValue, dcPwrSysTimerIpEntry=dcPwrSysTimerIpEntry)
l = [[], [], []] while True: l[0].append(input('Qual o nome do aluno? ').strip().capitalize()) n1 = float(input(f'Qual a primeira nota do aluno? ')) n2 = float(input(f'Qual o segunda nota do aluno? ')) l[1].append((n1 + n2) / 2) l[2].append(n1) l[2].append(n2) while True: c = input('Deseja continuar? [S/N] ').strip().lower() if c in 'sn': break print('-' * 30) if c in 'n': print(f'{"Nome":^9}{"Média":>21}') for i in enumerate(l[0]): print(f'{i[1]:.<24} {l[1][i[0]]:>5.2f}') print('-' * 30) break while True: while True: c2 = input('Deseja ver as notas de algum aluno? [S/N] ').strip().lower() if c2 in 'sn': break if c2 in 'n': print('FINALIZANDO...') break notas = input('Qual o nome do aluno? ').strip().capitalize() if notas in l[0]: if l[0].index(notas) == 0: print(f'Aluno: {notas.capitalize()} \nNota 1: {l[2][0]} \nNota 2: {l[2][1]}') else: num_list = l[0].index(notas) * 2 print(f'Aluno: {notas.capitalize()} \nNota 1: {l[2][num_list - 1]} \nNota 2: {l[2][num_list]}')
""" Transparent class proxy module. A wrapper class can be created using the function `wrap_with` or the decorators `proxy_of` (if the wrapped object type is specified explicitly) or `proxy` (if the wrapped object isn't specified). """ __all__ = ["wrap_with", "proxy_of", "proxy", "instance", "reset_proxy_cache"] IGNORE_WRAPPED_METHODS = frozenset( ( "__new__", "__init__", "__getattr__", "__setattr__", "__delattr__", "__getattribute__", ) ) PROXY_CACHE = {} def wrap_with(class_0, class_1=None, name=None): """ Wrap a class with a proxy. This function can be called in two ways: If the wrapped class is specified, `wrap` will take two class parameters, the wrapped class and the proxy class: >>> class Proxy(object): ... pass >>> print(wrap_with(int, Proxy).__name__) Proxy[int] If the wrapped class is not specified, `wrap` will only take the proxy class as a parameter: >>> print(wrap_with(Proxy).__name__) Proxy[object] Custom class names can also be specified: >>> print(wrap_with(int, Proxy, name="MyName").__name__) MyName """ if class_1 is None: wrapped_class = object proxy_class = class_0 else: wrapped_class = class_0 proxy_class = class_1 return _wrap_with_raw(wrapped_class, proxy_class, name) def proxy_of(wrapped_class, name=None): """ Decorator for making typed proxy classes. This works like the `wrap_with` method, except as a decorator. Usage: >>> @proxy_of(int) ... class Proxy(object): ... pass >>> print(Proxy.__name__) Proxy[int] Custom names can also be specified: >>> @proxy_of(int, name="MyProxy") ... class Proxy(object): ... pass >>> print(Proxy.__name__) MyProxy """ def _decorator(proxy_class): return wrap_with(wrapped_class, proxy_class, name) return _decorator def proxy(proxy_class): """ Decorator for making generic proxy classes. This works like the `wrap_with` method, except as a decorator. Usage: >>> @proxy ... class Proxy(object): ... pass >>> print(Proxy.__name__) Proxy[object] """ return wrap_with(proxy_class) def instance(obj): """ Return the instance the proxy is wrapping. Usage: >>> class Example(object): ... pass >>> class Proxy(object): ... pass >>> Proxy = wrap_with(Example) >>> example = Example() >>> proxy_obj = Proxy(example) >>> instance(proxy_obj) is example True """ return obj.__instance__ def reset_proxy_cache(): """ Reset all cached proxy classes. Only call this if you want to clear all cached proxy classes. """ global PROXY_CACHE PROXY_CACHE.clear() def _wrap_with_raw(wrapped_class, proxy_class, name): global PROXY_CACHE key = (wrapped_class, proxy_class, name) if key not in PROXY_CACHE: PROXY_CACHE[key] = _create_raw_wrapper(wrapped_class, proxy_class, name) return PROXY_CACHE[key] def _create_raw_wrapper(wrapped_class, proxy_class, name): instances = _instance_wrapper() common = _mro_common(wrapped_class, proxy_class) base_methods = _resolve_proxy_members(proxy_class, common) base_methods.update(IGNORE_WRAPPED_METHODS) resolution = _resolve_wrapped_members(wrapped_class, base_methods) members = {} members.update( { name: _proxied_value(base, name, instances) for name, base in resolution.items() } ) members.update(proxy_class.__dict__) proxy_init = _resolve_without_get(proxy_class, "__init__") @_overwrite_method(members) def __init__(self, inner, *args, **kwargs): if not isinstance(inner, wrapped_class): raise TypeError( "type {!r} cannot wrap object {!r} with type {!r}".format( type(self), inner, type(inner) ) ) instances.set_instance(self, inner) proxy_init(self, *args, **kwargs) @_overwrite_method(members, name="__instance__") @property def _instance_property(self): return instances.get_instance(self) if name is None: name = "{}[{}]".format(proxy_class.__name__, wrapped_class.__name__) return type(name, (proxy_class,), members) def _overwrite_method(members, name=None): def _decorator(func): fname = name if fname is None: fname = func.__name__ members[fname] = func return func return _decorator class _deleted(object): pass class _proxied_value(object): def __init__(self, base, name, instances): self._base = base self._name = name self._instances = instances def __get__(self, instance, owner): state = self._instances.get_state(instance) if self._name in state: result = state[self._name] elif self._name in self._base.__dict__: result = self._base.__dict__[self._name] owner = self._base if instance is not None: instance = self._instances.get_instance(instance) else: assert 0, "unreachable code" if result is _deleted: raise AttributeError( "type object {!r} has no attribute {!r}".format( owner.__name__, self._name ) ) if hasattr(result, "__get__"): result = result.__get__(instance, owner) return result def __set__(self, instance, value): state = self._instances.get_state(instance) state[self._name] = value def __delete__(self, instance): state = self._instances.get_state(instance) state[self._name] = _deleted class _instance_wrapper(object): def __init__(self): self._wrapped_objects = {} self._states = {} def set_instance(self, proxy, instance): self._wrapped_objects[id(proxy)] = instance def get_instance(self, proxy): return self._wrapped_objects[id(proxy)] def del_instance(self, proxy): del self._wrapped_objects[id(proxy)] self._states.pop(id(proxy), None) def get_state(self, proxy): if id(proxy) not in self._states: self._states[id(proxy)] = {} return self._states[id(proxy)] def _resolve_without_get(cls, name): for base in cls.__mro__: if name in base.__dict__: return base.__dict__[name] raise AttributeError(name) def _mro_common(left, right): left_mro = list(left.__mro__) left_mro.reverse() right_mro = list(right.__mro__) right_mro.reverse() result = [ left_base for left_base, right_base in zip(left_mro, right_mro) if left_base == right_base ] result.reverse() return result def _resolve_proxy_members(proxy_class, common): base_methods = set() for base in reversed(proxy_class.__mro__): if base in common: continue for name in base.__dict__.keys(): base_methods.add(name) return base_methods def _resolve_wrapped_members(wrapped_class, base_methods): resolution = {} for base in reversed(wrapped_class.__mro__): for name in base.__dict__.keys(): if name in base_methods: continue resolution[name] = base return resolution
def sum(str1: str, str2: str) -> str: """ Find the sum of two numbers represented as strings. Args: str1 - string: number str2 - string: number Returns - string: The result sum """ print("str1=" + str(str1) + ", str2=" + str(str2)) if not str1.isdigit() or not str2.isdigit() or str1 is None or str2 is None: return None list1 = list(str1) list2 = list(str2) print("list1=" + str(list1)) print("list2=" + str(list2)) result_str = "" if len(str1) > len(str2): smaller_number = str2 larger_number = str1 else: smaller_number = str1 larger_number = str2 larger_index = len(larger_number) - 1 digit_in_memory = 0 for index in range(len(smaller_number), 0, -1): digit1 = int(smaller_number[index - 1]) digit2 = int(larger_number[larger_index]) cur_sum = digit1 + digit2 + digit_in_memory if cur_sum > 9: result_str += str(cur_sum)[-1] digit_in_memory = int(str(cur_sum)[0]) else: result_str += str(cur_sum) digit_in_memory = 0 if index == 1 and digit_in_memory != 0: if len(str1) == len(str2): result_str += str(digit_in_memory) else: cur_sum = int(larger_number[larger_index - 1]) + digit_in_memory result_str += str(cur_sum) larger_index -= 1 reverse_result = result_str[::-1] first_part = "" if len(str1) != len(str2): first_part = larger_number[0:len(larger_number) - len(reverse_result):1] result_number = first_part + reverse_result return result_number def test_case_1(): print("\n->test_case_1") actual_result = sum("198", "13") expected = "211" print("actual_result={}, expected={}".format(actual_result, expected)) assert actual_result == expected, "{}, actual_result={}, expected={}".format("case1", actual_result, expected) def test_case_2(): print("\n->test_case_2") actual_result = sum("100000000000008", "94563") expected = "100000000094571" print("actual_result={}, expected={}".format(actual_result, expected)) assert actual_result == expected, "{}, actual_result={}, expected={}".format("case2", actual_result, expected) def test_case_3(): print("\n->test_case_3") actual_result = sum("35989", "94563") expected = "130552" print("actual_result={}, expected={}".format(actual_result, expected)) assert actual_result == expected, "{}, actual_result={}, expected={}".format("case3", actual_result, expected) def test_case_4(): print("\n->test_case_4") actual_result = sum("100098", "99") expected = "100197" print("actual_result={}, expected={}".format(actual_result, expected)) assert actual_result == expected, "{}, actual_result={}, expected={}".format("case4", actual_result, expected) def test_case_5(): print("\n->test_case_5") actual_result = sum("fdf45", "df99") expected = None print("actual_result={}, expected={}".format(actual_result, expected)) assert actual_result == expected, "{}, actual_result={}, expected={}".format("case5", actual_result, expected) def test_case_6(): print("\n->test_case_6") actual_result = sum("", None) expected = None print("actual_result={}, expected={}".format(actual_result, expected)) assert actual_result == expected, "{}, actual_result={}, expected={}".format("case6", actual_result, expected) def test(): test_case_1() test_case_2() test_case_3() test_case_4() test_case_5() test_case_6() print("================================") print("ALL TESTS ARE FINISHED") test()
""" Auth app testing package. """ __author__ = "William Tucker" __date__ = "2020-03-25" __copyright__ = "Copyright 2020 United Kingdom Research and Innovation" __license__ = "BSD - see LICENSE file in top-level package directory"
parrot = "Norwegian Blue" print(parrot) print(parrot[3]) print(parrot[4]) print(parrot[9]) print(parrot[3]) print(parrot[6]) print(parrot[8])
def bool_prompt(msg: str) -> bool: while True: response = input(f"{msg} [y/n]: ").lower() if response == "y": return True elif response == "n": return False else: print(f"'{response}' is an invalid option.")
class node_values: def __init__(self, iden, value): self.iden = iden self.value = value def get_iden(self): return self.iden def set_iden(self, iden): self.iden = iden def get_value(self): return self.value def set_value(self, value): self.value = value def __str__(self): iden = str(self.iden) value = str(self.value) return iden + ':' + value
class Person: def __init__(self, first_name, last_name): self.first = first_name self.last = last_name def speak(self): print("My name is "+ self.first+" "+self.last) me = Person("Brandon", "Walsh") you = Person("Ethan", "Reed") me.speak() you.speak()
"""Top-level package for Threaded File Downloader.""" __author__ = """Andy Jackson""" __email__ = '[email protected]' __version__ = '0.1.0'
def minRemove(arr, n): LIS = [0 for i in range(n)] len = 0 for i in range(n): LIS[i] = 1 for i in range(1, n): for j in range(i): if (arr[i] > arr[j] and (i - j) <= (arr[i] - arr[j])): LIS[i] = max(LIS[i], LIS[j] + 1) len = max(len, LIS[i]) return (n - len) arr = [1, 2, 6, 5, 4] n = len(arr) print(minRemove(arr, n))
# Programa 4.3 - Cálculo do Imposto de Renda salário = float(input("Digite o salário para cálculo do imposto: R$")) base = salário imposto = 0 if base > 3000: imposto = imposto + ((base - 3000) * 0.35) base = 3000 if base > 1000: imposto = imposto + ((base - 1000) * 0.20) print(f"Salário: R${salário:6.2f} Imposto a pagar: R${imposto:6.2f}")
# -*- coding:utf-8 -*- ''' For example, the number 7 is a "happy" number: 72 = 49 --> 42 + 92 = 97 --> 92 + 72 = 130 --> 12 + 32 + 02 = 10 --> 12 + 02 = 1 Once the sequence reaches the number 1, it will stay there forever since 12 = 1 On the other hand, the number 6 is not a happy number as the sequence that is generated is the following: 6, 36, 45, 41, 17, 50, 25, 29, 85, 89, 145, 42, 20, 4, 16, 37, 52, 29 ''' def is_happy(n): # Good Luck! values =[] #value = reduce(lambda x,y: x+y,map(lambda i : int(i)*int(i), str(n))) f_value = lambda n : sum(map(lambda i : int(i)*int(i), str(n))) while(True): n = f_value(n) if(n == 1): return True; if(values.__contains__(n)):return False; values.append(n); print(is_happy(7)) ## other method def is_happy1(n): while n > 4: n = sum(int(d)**2 for d in str(n)) return n == 1 def is_happy2(n): seen = set() while n not in seen: seen.add(n) n = sum(int(d) ** 2 for d in str(n)) return n == 1 def is_happy3(n): while n > 100: n = sum(int(d) ** 2 for d in str(n)) return True if n in [1, 7, 10, 13, 19, 23, 28, 31, 32, 44, 49, 68, 70, 79, 82, 86, 91, 94, 97, 100, 103, 109, 129, 130, 133, 139, 167, 176, 188, 190, 192, 193, 203, 208, 219, 226, 230, 236, 239, 262, 263, 280, 291, 293, 301, 302, 310, 313, 319, 320, 326, 329, 331, 338, 356, 362, 365, 367, 368, 376, 379, 383, 386, 391, 392, 397, 404, 409, 440, 446, 464, 469, 478, 487, 490, 496] else False
k, a, b = map(int, input().split()) if a + 1 >= b: print(k + 1) else: if k != 1: t = (k - 2) % a w = (k - 2) // a i = b % a j = b // a """if t == a - 1: print(b * (w + 1)) else: print(b * w + t)""" #p = ((k + 1) // (a + 2)) * (a + 2) - 1 #print(k + 1 - p + ((k + 1) // (a + 2)) * b) else: print(2)
""" Validate a Requirements Trace Matrix """ __version__ = "0.1.13"
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Carson Anderson <[email protected]> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub. actual code lives in the .ps1 # file of the same name ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = r''' --- module: win_optional_feature version_added: "2.8" short_description: Manage optional Windows features description: - Install or uninstall optional Windows features on non-Server Windows. - This module uses the C(Enable-WindowsOptionalFeature) and C(Disable-WindowsOptionalFeature) cmdlets. options: name: description: - The name(s) of the feature to install. - This relates to C(FeatureName) in the Powershell cmdlet. - To list all available features use the PowerShell command C(Get-WindowsOptionalFeature). type: list required: yes state: description: - Whether to ensure the feature is absent or present on the system. type: str choices: [ absent, present ] default: present include_parent: description: - Whether to enable the parent feature and the parent's dependencies. type: bool default: no source: description: - Specify a source to install the feature from. - Can either be C({driveletter}:\sources\sxs) or C(\\{IP}\share\sources\sxs). type: str seealso: - module: win_chocolatey - module: win_feature - module: win_package author: - Carson Anderson (@rcanderson23) ''' EXAMPLES = r''' - name: Install .Net 3.5 win_optional_feature: name: NetFx3 state: present - name: Install .Net 3.5 from source win_optional_feature: name: NetFx3 source: \\share01\win10\sources\sxs state: present - name: Install Microsoft Subsystem for Linux win_optional_feature: name: Microsoft-Windows-Subsystem-Linux state: present register: wsl_status - name: Reboot if installing Linux Subsytem as feature requires it win_reboot: when: wsl_status.reboot_required - name: Install multiple features in one task win_optional_feature: name: - NetFx3 - Microsoft-Windows-Subsystem-Linux state: present ''' RETURN = r''' reboot_required: description: True when the target server requires a reboot to complete updates returned: success type: bool sample: true '''
def arraycopy(ar): ret=[] for item in ar: ret.append(item) return ret def subtAr(a1,a2): ret=[] for i in range(0,len(a1)): ret.append(a1[i]-a2[i]) return ret def sumAr(a1,a2): ret=[] for i in range(0,len(a1)): ret.append(a1[i]+a2[i]) return ret def abs2Ar(ar): ret=0 for item in ar: ret+=item**2 return ret """ partial_derivation of "A_n" for scalar function of vector:F(A) where "A" is vector of [A_i],i=0,1,2...N-1 \frac{\partial F}{\partial A_n}|_A= \frac{F(A^+)-F(A^-)}{d} A^+=A+[A:An<-An+0.5d] A^-=A+[A:An<-An-0.5d] """ def partial_deriv(F,A,n,d): A1=arraycopy(A) A2=arraycopy(A) A1[n]=A1[n]+0.5*d A2[n]=A2[n]-0.5*d F1=F(A1) F2=F(A2) return (F1-F2)/d def solve_minimize(F,A0,partial_d,err,count=0): MAXCOUNT=1000 if count>=MAXCOUNT: return None N=len(A0) p1=[] p2=[] for i in range(0,N): p1.append(partial_deriv(F,A0,i,partial_d)) for i in range(0,N): """ def partial(A): return partial_deriv(F,A,i,partial_d) """ p2.append(partial_deriv(lambda x:partial_deriv(F,x,i,partial_d),A0,i,partial_d)) d=[] for i in range(0,N): d.append(-1.0*p1[i]/p2[i]) A1=sumAr(d,A0) if abs2Ar(d)<=err: return A1 else: return solve_minimize(F,A1,partial_d,err,count=count+1) def demofunc(A): return A[0]**2+(A[1]-3)**2+(A[2]-1)**2
# Copyright © 2021 BaraniARR # Encoding = 'utf-8' # Licensed under MIT License # Special Thanks for gogoanime """ANIME DL TELEGRAM BOT CREDENTIALS""" api_id = "8560623" api_hash = "d1f72390990c765e4816e77a1e5a5cfd" bot_token = "1697116493:AAHB_0tlyg9pQYaToiuOFatPzhx-IzsXBa8"
a = input () b = input () c=a a=b b=c print (a, b)
class Bird: def about(self): print("Species: Bird") def Dance(self): print("Not all but some birds can dance") class Peacock(Bird): def Dance(self): print("Peacock can dance") class Sparrow(Bird): def Dance(self): print("Sparrow can't dance")
''' 90-Faça um programa que leia nome e a media de aluno,guardando também a situação em um dicionário.No final mostre a estrutura na tela. ''' pessoa = {} pessoa['nome'] = str(input('Nome : ')).upper() pessoa['media'] = float(input(f"Média do aluno {pessoa['nome']}: ")) if pessoa['media'] >= 7: pessoa['situacao'] = 'Aprovado' else: if pessoa['media'] >= 5 and pessoa['media'] <= 6.9: pessoa['situacao'] = 'Prova final' else : if pessoa['media'] < 5: pessoa['situaçao'] = 'Reprovado' print('-=-'*20) for p,v in pessoa.items(): print(f'-{p} = {v}') print() print('-=-'*20) print()
def quickSort(alist, first, last): if (first < last): splitpoint = partition(alist, first, last) quickSort(alist, first, splitpoint - 1) quickSort(alist, splitpoint + 1, last) def partition(alist, first, last): pivotvalue = alist[first] leftmark = first +1 rightmark = last done = False while not done: while leftmark <= rightmark and alist[leftmark] <= pivotvalue: leftmark = leftmark + 1 while alist[rightmark] >= pivotvalue and rightmark >= leftmark: rightmark = rightmark - 1 if (rightmark < leftmark): done = True else: swap(alist, leftmark, rightmark) swap(alist, first, rightmark) return rightmark def swap(alist, left, right): temp = alist[left] alist[left] = alist[right] alist[right] = temp return alist alist = [54,26,93,17,77,31,44,55,20] quickSort(alist, 0, len(alist)-1) print(alist)
# -*- coding:utf-8 -*- data = """ # Step 1: 預浸 Test ## 繞圓注水 繞半徑 1 cm 的圓注水 40 ml 在注水過程中,會從 80 mm 升高到 70 mm 每 1 mm 吐出 0.1 ml 的水 每個吐水的點間距 0.01 mm ``` operations Command: Refill ``` ``` circle Radius: 2 cm Total Water: 60 ml High: 170 mm to 150 mm Feedrate: 80 mm/min Extrudate: 0.2 ml/mm Point interval: 0.1 mm ``` """
# Autor: Daniel Martínez(TrebolDan) #Reading input lines a=input().split() b=input().split() # score[0] to A & score[1] to B score = [0,0] # Comparing triplets for i in range (3): if(a[i]!=b[i]): # If equals, neither one gets a point if(a[i]>b[i]): score[0]=score[0]+1 # A bigger than B else: score[1]=score[1]+1 # B bigger than A # Printing out score print(score)
#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Colony Framework # Copyright (c) 2008-2020 Hive Solutions Lda. # # This file is part of Hive Colony Framework. # # Hive Colony Framework is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by the Apache # Foundation, either version 2.0 of the License, or (at your option) any # later version. # # Hive Colony Framework is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # Apache License for more details. # # You should have received a copy of the Apache License along with # Hive Colony Framework. If not, see <http://www.apache.org/licenses/>. __author__ = "João Magalhães <[email protected]>" """ The author(s) of the module """ __version__ = "1.0.0" """ The version of the module """ __revision__ = "$LastChangedRevision$" """ The revision number of the module """ __date__ = "$LastChangedDate$" """ The last change date of the module """ __copyright__ = "Copyright (c) 2008-2020 Hive Solutions Lda." """ The copyright for the module """ __license__ = "Apache License, Version 2.0" """ The license for the module """ class AstNode(object): """ The AST node class. """ value = None """ The value """ indent = False """ The indentation level """ child_nodes = [] """ The list of child nodes """ def __init__(self): """ Constructor of the class. """ self.child_nodes = [] def __repr__(self): """ Returns the default representation of the class. :rtype: String :return: The default representation of the class. """ return "<ast_node indent:%s child_nodes:%s>" % (self.indent, len(self.child_nodes)) def accept(self, visitor): """ Accepts the visitor running the iteration logic. :type visitor: Visitor :param visitor: The visitor object. """ visitor.visit(self) if visitor.visit_childs: for child_node in self.child_nodes: child_node.accept(visitor) def accept_post_order(self, visitor): """ Accepts the visitor running the iteration logic, in post order. :type visitor: Visitor :param visitor: The visitor object. """ if visitor.visit_childs: for child_node in self.child_nodes: child_node.accept_post_order(visitor) visitor.visit(self) def accept_double(self, visitor): """ Accepts the visitor running the iteration logic, using double visiting. :type visitor: Visitor :param visitor: The visitor object. """ visitor.visit_index = 0 visitor.visit(self) if visitor.visit_childs: for child_node in self.child_nodes: child_node.accept_double(visitor) visitor.visit_index = 1 visitor.visit(self) def set_value(self, value): """ Sets the value value. :type value: Object @para value: The value value. """ self.value = value def set_indent(self, indent): """ Sets the indent value. :type indent: int :param indent: The indent value. """ self.indent = indent def add_child_node(self, child_node): """ Adds a child node to the node. :type child_node: AstNode :param child_node: The child node to be added. """ self.child_nodes.append(child_node) def remove_child_node(self, child_node): """ Removes a child node from the node. :type child_node: AstNode :param child_node: The child node to be removed. """ self.child_nodes.remove(child_node) class GenericElement(AstNode): """ The generic element class. """ element_name = "none" def __init__(self, element_name = "none"): AstNode.__init__(self) self.element_name = element_name class PrintingDocument(AstNode): """ The printing document class. """ def __init__(self): AstNode.__init__(self) class Block(AstNode): """ The block class. """ def __init__(self): AstNode.__init__(self) class Paragraph(AstNode): """ The paragraph class. """ def __init__(self): AstNode.__init__(self) class Line(AstNode): """ The line class. """ def __init__(self): AstNode.__init__(self) class Text(AstNode): """ The text class. """ def __init__(self): AstNode.__init__(self) class Image(AstNode): """ The image class. """ def __init__(self): AstNode.__init__(self)
def lcsv(str_or_list): ''' List of Comma-Separated Values. Convert a str of comma-separated values to a list over the items, or convert such a list back to a comma-separated string. This function does not understand quotes. See the unit tests for examples of how ``lcsv`` works. ''' if isinstance(str_or_list, str): s = str_or_list if not s: return [] else: return s.split(',') lst = str_or_list return ','.join(lst) def test_empty(): assert lcsv('') == [] assert lcsv([]) == '' def test_str_simple(): assert lcsv('a,b,c') == ['a', 'b', 'c'] def test_list_simple(): assert lcsv(['foo', 'bar', 'baz']) == 'foo,bar,baz' def test_list_with_confusing_quotes(): # Make sure the quotes don't mean shit. It's all about them commas a = lcsv('quotes,"multi, word", are,not,understood') assert a[1:3] == ['"multi', ' word"']
# # PySNMP MIB module PDN-XDSL-INTERFACE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/PDN-XDSL-INTERFACE-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 20:31:00 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 2019, 09:23:15) # OctetString, Integer, ObjectIdentifier = mibBuilder.importSymbols("ASN1", "OctetString", "Integer", "ObjectIdentifier") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueRangeConstraint, ValueSizeConstraint, ConstraintsIntersection, ConstraintsUnion = mibBuilder.importSymbols("ASN1-REFINEMENT", "SingleValueConstraint", "ValueRangeConstraint", "ValueSizeConstraint", "ConstraintsIntersection", "ConstraintsUnion") ifIndex, = mibBuilder.importSymbols("IF-MIB", "ifIndex") pdn_xdsl, = mibBuilder.importSymbols("PDN-HEADER-MIB", "pdn-xdsl") ModuleCompliance, NotificationGroup = mibBuilder.importSymbols("SNMPv2-CONF", "ModuleCompliance", "NotificationGroup") NotificationType, TimeTicks, iso, Bits, Counter64, Gauge32, Unsigned32, MibIdentifier, Integer32, ObjectIdentity, IpAddress, NotificationType, ModuleIdentity, MibScalar, MibTable, MibTableRow, MibTableColumn, Counter32 = mibBuilder.importSymbols("SNMPv2-SMI", "NotificationType", "TimeTicks", "iso", "Bits", "Counter64", "Gauge32", "Unsigned32", "MibIdentifier", "Integer32", "ObjectIdentity", "IpAddress", "NotificationType", "ModuleIdentity", "MibScalar", "MibTable", "MibTableRow", "MibTableColumn", "Counter32") TextualConvention, TAddress, DisplayString, RowStatus, TruthValue = mibBuilder.importSymbols("SNMPv2-TC", "TextualConvention", "TAddress", "DisplayString", "RowStatus", "TruthValue") xdslIfConfigMIBObjects = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2)) xdslIfConfigMIBTraps = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 4)) xdslDevGenericIfConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 1)) xdslDevRADSLSpecificIfConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 2)) xdslDevMVLSpecificIfConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 3)) xdslDevSDSLSpecificIfConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 4)) xdslDevIDSLSpecificIfConfig = MibIdentifier((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 5)) xdslDevGenericIfConfigTable = MibTable((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 1, 1), ) if mibBuilder.loadTexts: xdslDevGenericIfConfigTable.setStatus('mandatory') xdslDevGenericIfConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 1, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: xdslDevGenericIfConfigEntry.setStatus('mandatory') xdslDevGenericIfConfigPortSpeedBehaviour = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 1, 1, 1, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("fixed", 1), ("adaptive", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevGenericIfConfigPortSpeedBehaviour.setStatus('mandatory') xdslDevGenericIfConfigMarginThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 1, 1, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevGenericIfConfigMarginThreshold.setStatus('mandatory') xdslDevGenericIfConfigPortID = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 1, 1, 1, 3), DisplayString().subtype(subtypeSpec=ValueSizeConstraint(1, 40))).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevGenericIfConfigPortID.setStatus('mandatory') xdslDevGenericIfConfigLinkUpDownTransitionThreshold = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 1, 1, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevGenericIfConfigLinkUpDownTransitionThreshold.setStatus('mandatory') xdslDevGenericIfConfigLineEncodeType = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 1, 1, 1, 5), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6))).clone(namedValues=NamedValues(("other", 1), ("cap", 2), ("twoB1q", 3), ("mvl", 4), ("g-lite", 5), ("dmt", 6)))).setMaxAccess("readonly") if mibBuilder.loadTexts: xdslDevGenericIfConfigLineEncodeType.setStatus('mandatory') xdslDevGenericIfConfigLineRateMode = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 1, 1, 1, 6), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("standard", 1), ("nx128", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevGenericIfConfigLineRateMode.setStatus('mandatory') xdslDevRADSLSpecificIfConfigTable = MibTable((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 2, 1), ) if mibBuilder.loadTexts: xdslDevRADSLSpecificIfConfigTable.setStatus('mandatory') xdslDevRADSLSpecificIfConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 2, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: xdslDevRADSLSpecificIfConfigEntry.setStatus('mandatory') xdslDevRADSLSpecificIfConfigUpFixedPortSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 2, 1, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevRADSLSpecificIfConfigUpFixedPortSpeed.setStatus('mandatory') xdslDevRADSLSpecificIfConfigDownFixedPortSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 2, 1, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevRADSLSpecificIfConfigDownFixedPortSpeed.setStatus('mandatory') xdslDevRADSLSpecificIfConfigUpAdaptiveUpperBoundPortSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 2, 1, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevRADSLSpecificIfConfigUpAdaptiveUpperBoundPortSpeed.setStatus('mandatory') xdslDevRADSLSpecificIfConfigUpAdaptiveLowerBoundPortSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 2, 1, 1, 4), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevRADSLSpecificIfConfigUpAdaptiveLowerBoundPortSpeed.setStatus('mandatory') xdslDevRADSLSpecificIfConfigDownAdaptiveUpperBoundPortSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 2, 1, 1, 5), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevRADSLSpecificIfConfigDownAdaptiveUpperBoundPortSpeed.setStatus('mandatory') xdslDevRADSLSpecificIfConfigDownAdaptiveLowerBoundPortSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 2, 1, 1, 6), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevRADSLSpecificIfConfigDownAdaptiveLowerBoundPortSpeed.setStatus('mandatory') xdslDevRADSLSpecificIfConfigReedSolomonDownFwdErrCorrection = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 2, 1, 1, 7), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3))).clone(namedValues=NamedValues(("minimizeError", 1), ("minimizeDelay", 2), ("reedSolomonNotSupported", 3)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevRADSLSpecificIfConfigReedSolomonDownFwdErrCorrection.setStatus('mandatory') xdslDevRADSLSpecificIfConfigStartUpMargin = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 2, 1, 1, 8), Integer32().subtype(subtypeSpec=ValueRangeConstraint(-3, 9))).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevRADSLSpecificIfConfigStartUpMargin.setStatus('mandatory') xdslDevRADSLSpecificIfConfigTxPowerAttenuation = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 2, 1, 1, 9), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevRADSLSpecificIfConfigTxPowerAttenuation.setStatus('mandatory') xdslDevRADSLSpecificIfConfigSnTxPowerAttenuation = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 2, 1, 1, 10), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevRADSLSpecificIfConfigSnTxPowerAttenuation.setStatus('mandatory') xdslDevMVLSpecificIfConfigTable = MibTable((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 3, 1), ) if mibBuilder.loadTexts: xdslDevMVLSpecificIfConfigTable.setStatus('mandatory') xdslDevMVLSpecificIfConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 3, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: xdslDevMVLSpecificIfConfigEntry.setStatus('mandatory') xdslDevMVLSpecificIfConfigMaxPortSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 3, 1, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevMVLSpecificIfConfigMaxPortSpeed.setStatus('mandatory') xdslDevMVLSpecificIfConfigOnHookTxPowerAttenuation = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 3, 1, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevMVLSpecificIfConfigOnHookTxPowerAttenuation.setStatus('mandatory') xdslDevMVLSpecificIfConfigOffHookTxPowerAttenuation = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 3, 1, 1, 3), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevMVLSpecificIfConfigOffHookTxPowerAttenuation.setStatus('mandatory') xdslDevSDSLSpecificIfConfigTable = MibTable((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 4, 1), ) if mibBuilder.loadTexts: xdslDevSDSLSpecificIfConfigTable.setStatus('mandatory') xdslDevSDSLSpecificIfConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 4, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: xdslDevSDSLSpecificIfConfigEntry.setStatus('mandatory') xdslDevSDSLSpecificIfConfigFixedPortSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 4, 1, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevSDSLSpecificIfConfigFixedPortSpeed.setStatus('mandatory') xdslDevSDSLSpecificIfConfigMaxPortSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 4, 1, 1, 2), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevSDSLSpecificIfConfigMaxPortSpeed.setStatus('mandatory') xdslDevSDSLSpecificIfConfigFixedPortSpeedNx128Mode = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 4, 1, 1, 3), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevSDSLSpecificIfConfigFixedPortSpeedNx128Mode.setStatus('mandatory') xdslDevSDSLSpecificIfConfigMaxPortSpeedNx128Mode = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 4, 1, 1, 4), Integer32().subtype(subtypeSpec=ValueRangeConstraint(0, 2147483647))).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevSDSLSpecificIfConfigMaxPortSpeedNx128Mode.setStatus('mandatory') xdslDevIDSLSpecificIfConfigTable = MibTable((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 5, 1), ) if mibBuilder.loadTexts: xdslDevIDSLSpecificIfConfigTable.setStatus('mandatory') xdslDevIDSLSpecificIfConfigEntry = MibTableRow((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 5, 1, 1), ).setIndexNames((0, "IF-MIB", "ifIndex")) if mibBuilder.loadTexts: xdslDevIDSLSpecificIfConfigEntry.setStatus('mandatory') xdslDevIDSLSpecificIfConfigPortSpeed = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 5, 1, 1, 1), Integer32()).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevIDSLSpecificIfConfigPortSpeed.setStatus('mandatory') xdslDevIDSLSpecificIfConfigTimingPortTransceiverMode = MibTableColumn((1, 3, 6, 1, 4, 1, 1795, 2, 24, 9, 2, 5, 1, 1, 2), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2))).clone(namedValues=NamedValues(("networkTiming", 1), ("localTiming", 2)))).setMaxAccess("readwrite") if mibBuilder.loadTexts: xdslDevIDSLSpecificIfConfigTimingPortTransceiverMode.setStatus('mandatory') mibBuilder.exportSymbols("PDN-XDSL-INTERFACE-MIB", xdslDevRADSLSpecificIfConfigReedSolomonDownFwdErrCorrection=xdslDevRADSLSpecificIfConfigReedSolomonDownFwdErrCorrection, xdslDevRADSLSpecificIfConfigDownFixedPortSpeed=xdslDevRADSLSpecificIfConfigDownFixedPortSpeed, xdslDevSDSLSpecificIfConfig=xdslDevSDSLSpecificIfConfig, xdslDevRADSLSpecificIfConfigUpAdaptiveUpperBoundPortSpeed=xdslDevRADSLSpecificIfConfigUpAdaptiveUpperBoundPortSpeed, xdslDevSDSLSpecificIfConfigTable=xdslDevSDSLSpecificIfConfigTable, xdslDevSDSLSpecificIfConfigMaxPortSpeedNx128Mode=xdslDevSDSLSpecificIfConfigMaxPortSpeedNx128Mode, xdslDevSDSLSpecificIfConfigFixedPortSpeed=xdslDevSDSLSpecificIfConfigFixedPortSpeed, xdslDevGenericIfConfigPortID=xdslDevGenericIfConfigPortID, xdslDevGenericIfConfigPortSpeedBehaviour=xdslDevGenericIfConfigPortSpeedBehaviour, xdslDevMVLSpecificIfConfigEntry=xdslDevMVLSpecificIfConfigEntry, xdslDevSDSLSpecificIfConfigFixedPortSpeedNx128Mode=xdslDevSDSLSpecificIfConfigFixedPortSpeedNx128Mode, xdslDevSDSLSpecificIfConfigEntry=xdslDevSDSLSpecificIfConfigEntry, xdslDevGenericIfConfigLineEncodeType=xdslDevGenericIfConfigLineEncodeType, xdslDevGenericIfConfig=xdslDevGenericIfConfig, xdslDevIDSLSpecificIfConfigEntry=xdslDevIDSLSpecificIfConfigEntry, xdslDevRADSLSpecificIfConfigUpAdaptiveLowerBoundPortSpeed=xdslDevRADSLSpecificIfConfigUpAdaptiveLowerBoundPortSpeed, xdslIfConfigMIBTraps=xdslIfConfigMIBTraps, xdslDevMVLSpecificIfConfigOnHookTxPowerAttenuation=xdslDevMVLSpecificIfConfigOnHookTxPowerAttenuation, xdslDevRADSLSpecificIfConfigUpFixedPortSpeed=xdslDevRADSLSpecificIfConfigUpFixedPortSpeed, xdslDevGenericIfConfigMarginThreshold=xdslDevGenericIfConfigMarginThreshold, xdslDevRADSLSpecificIfConfig=xdslDevRADSLSpecificIfConfig, xdslDevMVLSpecificIfConfig=xdslDevMVLSpecificIfConfig, xdslDevRADSLSpecificIfConfigDownAdaptiveUpperBoundPortSpeed=xdslDevRADSLSpecificIfConfigDownAdaptiveUpperBoundPortSpeed, xdslDevIDSLSpecificIfConfigPortSpeed=xdslDevIDSLSpecificIfConfigPortSpeed, xdslDevGenericIfConfigEntry=xdslDevGenericIfConfigEntry, xdslDevGenericIfConfigLinkUpDownTransitionThreshold=xdslDevGenericIfConfigLinkUpDownTransitionThreshold, xdslDevGenericIfConfigTable=xdslDevGenericIfConfigTable, xdslDevMVLSpecificIfConfigTable=xdslDevMVLSpecificIfConfigTable, xdslDevIDSLSpecificIfConfig=xdslDevIDSLSpecificIfConfig, xdslDevRADSLSpecificIfConfigStartUpMargin=xdslDevRADSLSpecificIfConfigStartUpMargin, xdslDevMVLSpecificIfConfigMaxPortSpeed=xdslDevMVLSpecificIfConfigMaxPortSpeed, xdslDevRADSLSpecificIfConfigTxPowerAttenuation=xdslDevRADSLSpecificIfConfigTxPowerAttenuation, xdslDevSDSLSpecificIfConfigMaxPortSpeed=xdslDevSDSLSpecificIfConfigMaxPortSpeed, xdslDevRADSLSpecificIfConfigDownAdaptiveLowerBoundPortSpeed=xdslDevRADSLSpecificIfConfigDownAdaptiveLowerBoundPortSpeed, xdslIfConfigMIBObjects=xdslIfConfigMIBObjects, xdslDevRADSLSpecificIfConfigTable=xdslDevRADSLSpecificIfConfigTable, xdslDevIDSLSpecificIfConfigTable=xdslDevIDSLSpecificIfConfigTable, xdslDevGenericIfConfigLineRateMode=xdslDevGenericIfConfigLineRateMode, xdslDevRADSLSpecificIfConfigSnTxPowerAttenuation=xdslDevRADSLSpecificIfConfigSnTxPowerAttenuation, xdslDevMVLSpecificIfConfigOffHookTxPowerAttenuation=xdslDevMVLSpecificIfConfigOffHookTxPowerAttenuation, xdslDevRADSLSpecificIfConfigEntry=xdslDevRADSLSpecificIfConfigEntry, xdslDevIDSLSpecificIfConfigTimingPortTransceiverMode=xdslDevIDSLSpecificIfConfigTimingPortTransceiverMode)
def _FindNonRepeat(_InputString, chars): count = 0 _NonRepeat = {} for i in chars: count = _InputString.count(i) if count > 1: print(count,i) if count == 1: _NonRepeat[count] = i #print(_NonRepeat) return(_NonRepeat) def _FindNonRepeat2(_InputString, chars): return(_InputString.count('a')) chars = 'abcdefghijklmnopqrstuvwxyz' input = 'aaacccssddbddd' NonRepeat = _FindNonRepeat2(input, chars) print(NonRepeat)
a=[1,2,3,4,5] a=a[::-1] print (a) a=[1,1,2,2,2,2,3,3,3] b=2 print(a.count(b)) a='ana are mere si nu are pere' b=a.split() c=len(b) print(c)
""" LeetCode Problem: 107. Binary Tree Level Order Traversal II Link: https://leetcode.com/problems/binary-tree-level-order-traversal-ii/ Language: Python Written by: Mostofa Adib Shakib Time Complexity: O(N) Space Complexity: O(N) """ class Solution: def levelOrderBottom(self, root: TreeNode) -> List[List[int]]: # Edge case if not root: return [] queue = [root] result = [] while queue: nextLevel = [] for i in range(len(queue)): node = queue.pop(0) nextLevel.append(node.val) if node.left: queue.append(node.left) if node.right: queue.append(node.right) result.append(nextLevel) return result[::-1]
class ContactHelper: def __init__(self, app): self.app = app def create(self, contact): wd = self.app.wd wd.find_element_by_link_text("add new").click() wd.find_element_by_name("firstname").click() wd.find_element_by_name("firstname").clear() wd.find_element_by_name("firstname").send_keys(contact.first) wd.find_element_by_name("middlename").click() wd.find_element_by_name("middlename").clear() wd.find_element_by_name("middlename").send_keys(contact.middle) wd.find_element_by_name("lastname").click() wd.find_element_by_name("lastname").clear() wd.find_element_by_name("lastname").send_keys(contact.last) wd.find_element_by_name("nickname").click() wd.find_element_by_name("nickname").clear() wd.find_element_by_name("nickname").send_keys(contact.nick) wd.find_element_by_name("title").click() wd.find_element_by_name("title").clear() wd.find_element_by_name("title").send_keys(contact.title) wd.find_element_by_name("company").click() wd.find_element_by_name("company").clear() wd.find_element_by_name("company").send_keys(contact.company) wd.find_element_by_name("address").click() wd.find_element_by_name("address").clear() wd.find_element_by_name("address").send_keys(contact.address) wd.find_element_by_name("home").click() wd.find_element_by_name("theform").click() wd.find_element_by_name("home").click() wd.find_element_by_name("home").clear() wd.find_element_by_name("home").send_keys(contact.home) wd.find_element_by_name("mobile").click() wd.find_element_by_name("mobile").clear() wd.find_element_by_name("mobile").send_keys(contact.mob) wd.find_element_by_name("work").click() wd.find_element_by_name("work").clear() wd.find_element_by_name("work").send_keys(contact.work) wd.find_element_by_name("fax").click() wd.find_element_by_name("fax").clear() wd.find_element_by_name("fax").send_keys(contact.fax) wd.find_element_by_name("home").click() wd.find_element_by_name("home").clear() wd.find_element_by_name("home").send_keys(contact.homephone) wd.find_element_by_name("email2").click() wd.find_element_by_name("email2").clear() wd.find_element_by_name("email2").send_keys(contact.email) wd.find_element_by_name("homepage").click() wd.find_element_by_name("homepage").clear() wd.find_element_by_name("homepage").send_keys(contact.homepage) if not wd.find_element_by_xpath("//div[@id='content']/form/select[1]//option[15]").is_selected(): wd.find_element_by_xpath("//div[@id='content']/form/select[1]//option[15]").click() if not wd.find_element_by_xpath("//div[@id='content']/form/select[2]//option[6]").is_selected(): wd.find_element_by_xpath("//div[@id='content']/form/select[2]//option[6]").click() wd.find_element_by_name("byear").click() wd.find_element_by_name("byear").clear() wd.find_element_by_name("byear").send_keys(contact.birthyear) if not wd.find_element_by_xpath("//div[@id='content']/form/select[3]//option[6]").is_selected(): wd.find_element_by_xpath("//div[@id='content']/form/select[3]//option[6]").click() if not wd.find_element_by_xpath("//div[@id='content']/form/select[4]//option[5]").is_selected(): wd.find_element_by_xpath("//div[@id='content']/form/select[4]//option[5]").click() wd.find_element_by_name("theform").click() wd.find_element_by_name("address2").click() wd.find_element_by_name("address2").clear() wd.find_element_by_name("address2").send_keys(contact.address) wd.find_element_by_name("phone2").click() wd.find_element_by_name("phone2").clear() wd.find_element_by_name("phone2").send_keys(contact.homephone) wd.find_element_by_name("notes").click() wd.find_element_by_name("notes").clear() wd.find_element_by_name("notes").send_keys(contact.note) wd.find_element_by_xpath("//div[@id='content']/form/input[21]").click() wd.find_element_by_link_text("home").click() def delete_first_contact(self): wd = self.app.wd wd.find_element_by_link_text("home").click() #select first contact wd.find_element_by_name("selected[]").click() #submit detetion wd.find_element_by_xpath("//div[@id='content']/form[2]/div[2]/input").click() wd.switch_to_alert().accept()
""" 215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? """ number = 2**1000 string = str(number) sum = 0 for c in string: sum = sum + int(c) print("the sum of the digits of the number 2e1000: %s" % sum)
FAST_NULL = 0x000 FAST_NOON = 0x201 FAST_SUNSET = 0x202 FAST_MOONRISE = 0x203 FAST_DUSK = 0x204 FAST_MIDNIGHT = 0x205 FAST_EKADASI = 0x206 FAST_DAY = 0x207
memo = {1: 1, 2: 2, 3: 4} def climb(n): if n == 1: return 1 elif n == 2: return 2 elif n == 3: return 4 else: c = 0 for i in [1, 2, 3]: t = memo.get(n - i) if not t: memo[n - 1] = climb(n - 1) c += memo.get(n - i) return c s = int(input().strip()) for a0 in range(s): n = int(input().strip()) print(climb(n))
# pylint: skip-file computing.ubm_training_workers = 8 computing.ivector_dataloader_workers = 22 computing.feature_extraction_workers = 22 computing.use_gpu = True computing.gpu_ids = (0,) paths.output_folder = '/media/ssd2/vvestman/sitw_ivector_outputs' paths.feature_and_list_folder = 'datasets' # No need to update this paths.kaldi_recipe_folder = '/media/hdd2/vvestman/kaldi/egs/voxceleb/v1' # ivector recipe paths.musan_folder = '/media/hdd3/musan' # Used in Kaldi's augmentation paths.datasets = { 'voxceleb1': '/media/hdd3/voxceleb1', 'voxceleb2': '/media/hdd3/voxceleb2', 'sitw': '/media/hdd3/sitw'} features.vad_mismatch_tolerance = 0
numbers = [111, 7, 2, 1] print(len(numbers)) print(numbers) ### numbers.append(4) print(len(numbers)) print(numbers) ### numbers.insert(0, 222) print(len(numbers)) print(numbers) # my_list = [] # Creating an empty list. for i in range(5): my_list.append(i + 1) print(my_list) my_list = [] # Creating an empty list. for i in range(5): my_list.insert(0, i + 1) print(my_list) my_list = [10, 1, 8, 3, 5] total = 0 for i in range(len(my_list)): total += my_list[i] print(total) ### # step 1 beatles = [] print("Step 1:", beatles) # step 2 beatles.append("John Lennon") beatles.append("Paul McCartney") beatles.append("George Harrison") print("Step 2:", beatles) # step 3 for i in range(2): beatles.append(input("Enter a word: ")) print("Step 3:", beatles) # step 4 del(beatles[-1]) del(beatles[-1]) print("Step 4:", beatles) # step 5 beatles.insert(0,"Ringo Starr") print("Step 5:", beatles) # testing list legth print("The Fab", len(beatles)) ###
# -*- coding: utf-8 -*- ICX_TO_LOOP = 10 ** 18 LOOP_TO_ISCORE = 1000 def icx(value: int) -> int: return value * ICX_TO_LOOP def loop_to_str(value: int) -> str: if value == 0: return "0" sign: str = "-" if value < 0 else "" integer, exponent = divmod(abs(value), ICX_TO_LOOP) if exponent == 0: return f"{sign}{integer}.0" return f"{sign}{integer}.{exponent:018d}" def loop_to_iscore(value: int) -> int: return value * LOOP_TO_ISCORE
# http://codeforces.com/problemset/problem/34/A n = int(input()) heights = [int(x) for x in input().split()] soldiers = [x for x in range(1, n + 1)] heights.append(heights[0]) soldiers.append(soldiers[0]) first_min = 0 second_min = 0 difference_min = 999999999999999999999999 for i in range(len(heights) - 1): difference = abs(heights[i] - heights[i+1]) if difference < difference_min: difference_min = difference first_min = soldiers[i] second_min = soldiers[i+1] print(first_min, second_min)