or
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing
xxxxxxxxxx
get-hash consolidation
MOVED TO: https://hackmd.io/9ZezLZshR2OE65JD9YcjYg
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →PROBLEMS
Duplicated code
There are many different get-hash code functions spread across tripleo projects/repos w/ their respective unique ways of getting the hash from dlrn api. All these bits must be consolidated in one single code.
Bash code
Some bits in bash are hard to test, or even untestable.
Deprecated / old code
Some of these methods are no longer used and should be removed from the code base.
SOLUTION
Once you get dlrnapi_client installed in the virtualenv, you can use dlrn_api ansible module like in the example here. You may also import the python module dlrnapi_client, which comes from the same pip packages installed.
Tested example:
Note: This works pretty well on py3
- The image file may be corrupted
- The server hosting the image is unavailable
- The image path is incorrect
- The image format is not supported
Learn More →Collateral fixes
The bits that interact with dlrn api (like
check_dlrn_reports
task andpromote-hash
role) are written in bash and should be replaced w/ python/ansible modules. These are not directly related toget-hash
code.check dlrn reports
Even w/ the new role, the code that interacts w/ dlrnapi is a bash script. And it sources files w/ env vars. This is how hash_info files are created and sourced in the get-hash role.
promote hash
Another piece of code that is in bash and must be converted to ansible is the promote-hash role in config repo.